locked
Decrease max length of a field in CRM2011 RRS feed

  • Question

  • Hello all,

    I have a text fiel with max length is 100 and in DB it is nvarchar(100).

    For some reason I need to decrease the max length to 60. I've update customization and publish. But when I look at in Db the column field is still nvarchar(100).

    And I still can save the form with the max lenght larger than 60.

    Any diea for help, please?

    Thanks and regards


    If my question/answer can help you, please give me a points :) ----You may be disappointed if you fail, but you are doomed if you don't try---

    Wednesday, June 25, 2014 4:20 AM

Answers

  • Hi,

    When you reduce the size of a field, the size in the database is actually not reduced. It still holds the old size. This is probably done to prevent truncating of existing data that might exist in the database which is of larger size than the reduced length. The reduced length is actually enforced in the application level.

    However, it should prevent you from entering larger data in from the form larger than 60. Is it existing data that you are modifying or have you tried with a new record which doesn't have any data in that field?


    Admin QuikView Solution for CRM 2013

    Wednesday, June 25, 2014 4:38 AM

All replies

  • Hi,

    When you reduce the size of a field, the size in the database is actually not reduced. It still holds the old size. This is probably done to prevent truncating of existing data that might exist in the database which is of larger size than the reduced length. The reduced length is actually enforced in the application level.

    However, it should prevent you from entering larger data in from the form larger than 60. Is it existing data that you are modifying or have you tried with a new record which doesn't have any data in that field?


    Admin QuikView Solution for CRM 2013

    Wednesday, June 25, 2014 4:38 AM
  • Yes, as Dynamotion suggested correctly system can not reduced length because it means existing data will be truncated, how ever since you enter this length on application (CRM) side now new data won't over specified (60) length.  

    MayankP
    My Blog
    Follow Me on Twitter

    Wednesday, June 25, 2014 8:37 AM
    Answerer