Controlling Fields and Tabs using java script
function controllingFieldsAndTabs() { debugger; Xrm.Page.ui.controls.get("parentaccountid").setVisible(false); //Get the value from a CRM field var value = Xrm.Page.getAttribute(“CRMFieldSchemaName”).getValue(); //Set the value of a CRM field Xrm.Page.getAttribute(“CRMFieldSchemaName“).setValue(“New Value”); //Get the value from a CRM OptionSet field var value = Xrm.Page.getAttribute(“CRMOptionSetSchemaName”).getValue(); //Get the text from a CRM OptionSet field var text = Xrm.Page.getAttribute(“CRMOptionSetSchemaName”).getText(); //Set the value of a CRM OptionSet field Xrm.Page.getAttribute(“CRMOptionSetSchemaName”).setValue(“1”); // OptionSet Value // Get the selected text of a CRM OptionSet field Xrm.Page.getAttribute(“CRMOptionSetSchemaName”).getSelectedOption().text; ...