// 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 = Xrm.Page.data.entity.attributes.get(“<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.