I have added a "lock" field to the same form that this web resource is on. I would like to prevent the resource from running based on this lock field and display a hidden field in its place.
Is there a simple way to accomplish this?
I tried adding this at the start and end, but was not successful.
var lockform = Xrm.Page.getAttribute("new_lockworkorder").getvalue();
if (lockform !== "Yes"){
<The rest of the Script>
}
else {
Xrm.Page.ui.tabs.get("tab_9").sections.get("tab_10_section_1").setVisible(true);
}
}
Appreciate the assistance!