SHOWING AN ERROR THROUGH JAVASCRIPT IN POWER APPS AND DYNAMICS 365

Talha Manzoor
0

 When customizing model-driven Power Apps and Dynamics 365 with JavaScript, you may need to display an error to the user. One way to do this is to use Xrm.Navigation.openErrorDialog, which is called like below:

Xrm.Navigation.openErrorDialog(errorOptions).then(successCallback,errorCallback);

Let’s run it in browser Development Tools to show how it works. Open a Power App and in dev tools add the following code:Xrm.Navigation.openErrorDialog({ errorCode:”ABC7123″, details:”These are the details that will go into the downloaded file”, message:”Here’s the message” }).then( function (success) { console.log(success); }, function (error) { console.log(error); });

Let’s run this:

We see we get our Message as well as an option to Show Details:

Read More

Post a Comment

0Comments

Post a Comment (0)