Now Open CRM record in dialog using navigateTo Client API

Sending
User Review
0 (0 votes)

Introduction

With 2020 Release Wave 1 Update for Dynamics 365, we can open main form of CRM record in dialog using navigateTo Client API. Earlier, we used Xrm.Navigation.openForm method to open CRM record and this method opened the CRM record in new window or same window of browser.

Using navigateTo Client API, we can open the CRM record in dialog from our custom web resource or any CRM form, without leaving our current form or web resource.

Below, we have provided information about how to open the CRM record in dialog.

Open new CRM record

Here we have opened new CRM record of contact entity.

var pageProperty = {

pageType: “entityrecord”,

entityName: “contact”,

formType: 2,

};

var navigationProperty = {

target: 2,

width: {value: 80, unit:”%”},

position: 1

};

Xrm.Navigation.navigateTo(pageProperty, navigationProperty);

navigateTo Client API

Open existing CRM record

Here we have opened existing CRM record of contact entity.

var pageProperty = {

pageType: “entityrecord”,

entityName: “contact”,

formType: 2,

entityId: “979dfe31-0686-ea11-a811-000d3a579c9c”//guid of record

};

var navigationProperty = {

target: 2,

width: { value: 80, unit: “%” },

position: 1

};

Xrm.Navigation.navigateTo(pageProperty, navigationProperty);

navigateTo Client API

Conclusion

With the help of navigateTo Client API, we can open main form of CRM record in dialog.

Leave a Reply