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

Community site session details

Session Id :

D365 V9 Alert Dialog

Community Member Profile Picture Community Member

Introduction:

This blog explains how to show alerts in D365 V9.

Details:

We often get requirement to show alerts in D365 V9 Forms and can be achieved using below syntax.

Xrm.Navigation.openAlertDialog(alertStrings,alertOptions).then(closeCallback,errorCallback);

Example:
1. Alert with no callbacks.

var alertStrings = { text: "successfully checkedin." };
var alertOptions = { height: 120, width: 260 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then( function () { }  );

2. Alert with callback method.

var alertStrings = { confirmButtonLabel: "Yes", text: "This is an alert." };
var alertOptions = { height: 120, width: 260 };
Xrm.Navigation.openAlertDialog(alertStrings, alertOptions).then(
    function success(result) {
        console.log("Alert dialog closed");
    },
    function (error) {
        concole.log(error.message);
    }
);

Note: Xrm.Utility.alertDialog(message,onCloseCallback) is been deprecated.

The post D365 V9 Alert Dialog appeared first on CloudFronts - Microsoft Dynamics 365 | Power BI | Azure.

Comments

*This post is locked for comments