web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Day 3 - Basic event handling - Onload, Onchange in MSCRM / Dataverse

Ram Prakash Duraisamy Profile Picture Ram Prakash Duraisamy 5,631 Super User 2025 Season 2

 Introduction:


In this blog we will see how to use Basic event handling - Onload, Onchange in MSCRM / Dataverse


function onChange(executionContext) {
    var formContext = executionContext.getFormContext();

    if (formContext.getAttribute("bosch_dayname").getValue() != null) {
        var alertStrings = { confirmButtonLabel: "Yes", text: formContext.getAttribute("bosch_dayname").getValue(), title: "Throw Alert" };
        var alertOptions = { height: 120, width: 260 };
        Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
            function (success) {
                console.log("Alert dialog closed");
            },
            function (error) {
                console.log(error.message);
            }
        );
    }
}


Comments