Skip to content

Commit f8e847b

Browse files
committed
Added fallback to Xrm.Utility.getGlobalContext before parent window and Xrm.Page
1 parent dbfbeea commit f8e847b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,11 @@ namespace XQW {
13101310
return GetGlobalContext().getClientUrl();
13111311
}
13121312
} catch (e) {}
1313+
try {
1314+
if (Xrm && Xrm.Utility && Xrm.Utility.getGlobalContext) {
1315+
return Xrm.Utility.getGlobalContext().getClientUrl();
1316+
}
1317+
} catch (e) {}
13131318
try {
13141319
if (window && window.parent && window.parent.window) {
13151320
const w = <typeof window & { Xrm: any; }>(window.parent.window)

0 commit comments

Comments
 (0)