How to Get the label of the control using Javascript?

// JavaScript/JScript in CRM 2011 | CRM 2011 Training Series
// How to Get the label of the control using Javascript?
    Xrm.Page.ui.controls.get(‘<Attribute Name>’).getLabel()
    // Get record id
    // set field as required based value of a check box field.
    function OnChangeBoolField()
    var varBool =“<Boolean Field Name>”).getValue();
    if(varBool == false)
     Xrm.Page.getAttribute(“<Attribute Name>”).setRequiredLevel(“required”);
     Xrm.Page.getAttribute(“<Attribute Name>”).setRequiredLevel(“none”);
**For CRM 2011 Training, please check out our CRM Training page. Please share |Like in Facebook if you feel like this page is useful.

About Dynamics CRM Guru

We are a group of CRM Consultants and have rich experience in all Microsoft CRM versions. Currently we provide training in Microsoft CRM 2015/CRM 2013 and CRM 2011.

Posted on March 12, 2013, in CRM 2011 JScript, Microsoft CRM 2011, MS CRM 2011 Training and tagged . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: