Oct 19, 2011

A misleading behaviour of address fields lengths

I recently found some tricky fields in CRM 4.0 that could make developer’s life bad. I found this in Lead entity, but this issue could be applicable for some other entities. Anyway this has nothing to do with custom entities.

If you see the address fields of Lead, you will be able to find some fields such as Address1_line1, Address1_city, Address2_line1, Address2_City2 and etc. If you go to customization area you can increase the maximum length of those fields. Unfortunately, publishing too is possible.


Since it is publishable one can think, everything is fine, but still actually field length is not changed. Tricky part is you may be able to create records sometimes, but when you try to create record with long data for those fields you will get an error.


Anyway, reason for this issue is, CRM is keeping those data in a separate table, which is not being modified through usual customization process. (I guess) Check the way, actual address fields of Lead are kept in a different table. It shows the actual maximum lengths you can go for. This is bit misleading since you are allowed to publish the entity after changing those fields.


I wonder if anyone has tried changing those database fields outside the CRM.

No comments:

Post a Comment