To Disable the Lookup fields......
Xrm.Page.ui.controls.get("fieldnameid").setDisabled(true);
To Retrieve Value from CRM2011 Field........
Xrm.Page.getAttribute("fieldnameid").getValue();
To make the field mandatory............
Xrm.Page.getAttribute("fieldname").setRequiredLevel("required");
To make non-mandatory........
Xrm.Page.getAttribute("fieldname").setRequiredLevel("none");
Assign Value to the Picklist........
Xrm.Page.getAttribute("fieldname").setValue(1);
To Make the Field Empty(null).......
Xrm.Page.getAttribute("fieldname").setValue(null);
Happy CRMing................
No comments:
Post a Comment