Reputation: 1165
I'm using Dynamics Online (2011). I'm trying to make a field required based on a client selection, but to get me started I've written the below script to make the field required regardless of their selection. However when I run call this function I get the following error. any help would be highly appropriated.
function updateProductAreaRequirement() {
try {
crmForm.SetFieldReqLevel("pt_productarea", 1);
}
catch(err) {
alert("Error : " + err);
}
}
Upvotes: 1
Views: 527
Reputation: 17562
You're using CRM 4 JavaScript, try the newer CRM 2011 syntax.
Xrm.Page.getAttribute("pt_productarea").setRequiredLevel("required");
Upvotes: 4
Reputation: 4585
Please read this discussion discussion. Someone has suggested a workaround for the same issue. I hope it will help you.
crmForm.all.<fieldname>Select.children[1].bCached = false;
Upvotes: 1