getCurrentAppUrl (Client API reference)
Returns the URL of the current business app in model-driven apps.
Note
In mobile client, this method returns null value.
Syntax
var globalContext = Xrm.Utility.getGlobalContext();
globalContext.getCurrentAppUrl();
Return Value
Type: String
Description: URL of the current business app. Possible return values:
Value | Client |
---|---|
https://[org].crm.dynamics.com/main.aspx?appid=[GUID] |
model-driven apps (online) |
https://[server]/[org]/main.aspx?appid=[GUID] |
model-driven apps (on-premises) |
Related articles
Create, manage, and publish model-driven apps using code
Xrm.Utility.getGlobalContext