0

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");

    }

Edited by happygeek: moved

1
Contributor
1
Reply
35
Views
2 Months
Discussion Span
Last Post by thomas_43
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.