Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Blogs / Adrian Begovich's Blog / Xrm.Navigation Client API M...

Xrm.Navigation Client API Methods

Adrian Begovich Profile Picture Adrian Begovich 1,014 Super User 2024 Season 2

The Xrm.Navigation Client API namespace is included in Microsoft Dynamics 365, version 9.0 as part of the Xrm Object Model. It provides seven methods for navigating Dynamics 365 and displaying dialogs. This blog post will give you a quick overview of the Xrm.Navigation Client API Methods so that you can begin using them in your own projects.

5127.Xrm.png

openAlertDialog

This method displays a customisable alert dialog containing a message and a confirm button. The labels of the button can be customised, and the height and width of the alert dialog box can be altered.

Xrm.Navigation.openAlertDialog(alertStrings,alertOptions).then(closeCallback,errorCallback);
0602.Alert-Dialog.jpg

openConfirmDialog

Displays a confirmation dialog box containing text, a cancel button, and a confirm button. The labels of the buttons can be customised, and the height and width of the confirmation dialog box can be altered.

Xrm.Navigation.openConfirmDialog(confirmStrings,confirmOptions).then(successCallback,errorCallback);
Confirmation-Dialog.png

openErrorDialog

This method displays a customisable error dialog. The error details can be changed to give more information to users working with Dynamics 365.

Xrm.Navigation.openErrorDialog(errorOptions).then(successCallback,errorCallback);
Error-Dialog.png

openFile

By default, this method opens a file, but it can also save files by changing the openFileOptions parameter.

Xrm.Navigation.openFile(file,openFileOptions);

openForm

Opens an entity form or a quick create form. This method is a replacement for the deprecated Xrm.Utility.openEntityForm and Xrm.Utility.openQuickCreate methods.

Xrm.Navigation.openForm(entityFormOptions,formParameters).then(successCallback,errorCallback);

openUrl

This method opens a URL, including URLs for files. This is particularly useful for opening a URL in a browser from a mobile client.

Xrm.Navigation.openUrl(url,openUrlOptions);

openWebResource

This method opens a HTML web resource, and is a replacement for the deprecated Xrm.Utility.openWebResource method.

Xrm.Navigation.openWebResource(webResourceName,windowOptions,data);

Comments

*This post is locked for comments