Thursday, December 24, 2015

Accessing composite control in CRM

To access the composite control in crm.
Syntax:
(Composite control name)_compositionLinkControl_(Attribute Name);
Example:
function onload(){
//Disable the address1_city control
Xrm.Page.getControl(“address1_composite_compositionLinkControl_address1_city”).setDisabled(true)
//Relabelling address1_city 
 Xrm.Page.getControl(“address1_composite_compositionLinkControl_address1_city”).setLabel(true);
}
Add this function in form onload
The above piece of code is to disable the City attribute of the address1 composite control.
This way you can access all the composite fields in the CRM.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.