Hide/Show fields based on condition(This should work for lookup & Picklist) :
//This should be implemented on form onload event
function DisableTitle() {
//Here new_journalnumber is the lookup field name
var varTitle =Xrm.Page.data.entity.attributes.get('new_journalnumber').getValue();
if ( varTitle != null) {
crmForm.all.title.disabled = true;
crmForm.all.new_journalnumber.disabled = true;
crmForm.all.new_documenttype.disabled = true;
crmForm.all.casetypecode.disabled = true;
crmForm.all.casetypecode.disabled = true;
}
}
No comments:
Post a Comment