function DisableFieldAfterCreation(fieldName)
{
var formType = Xrm.Page.ui.getFormType();
if(formType != 1)
{
var field=Xrm.Page.ui.controls.get(fieldName);
if(field != null)
{
field.setDisabled(true);
}
}
}
Note: call this method onload of form and pass field name as parameter
{
var formType = Xrm.Page.ui.getFormType();
if(formType != 1)
{
var field=Xrm.Page.ui.controls.get(fieldName);
if(field != null)
{
field.setDisabled(true);
}
}
}
Note: call this method onload of form and pass field name as parameter
No comments:
Post a Comment