Posts

Showing posts with the label customization

Extending length address fields on account entity (or contact entity)

When you need to extend the length of the address fields on the account entity (or the contact entity), don't forget to also extend the length of the corresponding fields on the customeraddress entity. The address values are also saved in there... So to avoid error messages saying that the length isn't long enough (although you changed it for the account entity), be sure to update both entities!

Disable CRM Form through JavaScript

I often get the question how to disable a form, so here it is: The trick is to disable all the fields that are on the form. You can do this by using the following JavaScript: if (crmForm.FormType == 2) { for( var i = 0 ; i { if( crmForm.all[ i ].req) crmForm.all[ i ].Disabled = true; } } In the code I check if the form is in the update modus (FormType == 2), because I don't think that disabling a form while in create modus makes much sense. In the real world you'd probably disable a form depending on the value of another field. Would you like to keep some fields editable, you can do the following: if (crmForm.FormType == 2) { for( var i = 0 ; i { if( crmForm.all[ i ].req && crmForm.all[i].id != "name") crmForm.all[ i ].Disabled = true; } } Here I disable all fields except the name field (crmForm.all[i].id != "name"). You can add other fields according to your needs. Just make sure you use the sc...

Adding Subareas to the SiteMap

When adding (or changing) subareas to the sitemap of CRM, you must make sure that you don't use the same ID for a subarea in the same area (even if the subareas are in different groups). For example: <Area Id="Workplace" ResourceId="Area_Workplace" ShowGroups="true" Icon="/_imgs/workplace_24x24.gif" DescriptionResourceId="Workplace_Description"> <Group Id="Customers" ResourceId="Group_Customers" DescriptionResourceId="Customers_Description"> <SubArea Id="nav_accts" Entity="account" /> <SubArea Id="nav_conts" Entity="contact" /> <SubArea Id="nav_leads" Entity="lead" /> </Group> <Group Id="SFA" ResourceId="Area_Sales" IsProfile="true" DescriptionResourceId="Sales_Description"> <SubArea Id="nav_leads1" Entity=...