How to replace Xrm.Page.context.getClientUrl() in Dynamics 365 version 9

Xrm.Page.context.getClientUrl() : Returns the base URL that was used to access the application.

In Version 9 :

var globalContext = Xrm.Utility.getGlobalContext();

globalContext.getClientUrl();

For more details refer this link: https://docs.microsoft.com/en-us/dynamics365/customer-engagement/developer/clientapi/reference/xrm-utility/getglobalcontext/getclienturl

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s