Hi,
I am trying to move from a Xrm.Page code to pulling from a library. I want a notifiction whenever the field value is tagged as needing to be notified.
right now the code that works is....
var message = "This person needs to be notified";
function SetANotification()
{
if (Xrm.Page.getAttribute("abc_6").getValue())
{
Xrm.Page.ui.setFormNotification(message, "INFO", "NOTE");
}
else
{
Xrm.Page.ui.clearFormNotification("NOTE");
}
}
However, like I said instead of using the form commands I want to pull from another library (executionContext). I recieve an error stating "TypeError: Unable to get property 'getValue' of undefined or null reference at....".
So the code I developed is...
var message = "This person needs to be notified";
function SetANotification(executionContext) {
if (getAttribute("abc_6").getValue())
{
setFormNotification(message, "INFO", "NOTE");
}
else
{
clearFormNotification("NOTE");
}