From eb0f2ac5aaf7399cac46076d40b342e451d22eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Aagaard=20S=C3=B8e=20Larsen?= Date: Thu, 11 Jan 2024 15:38:53 +0100 Subject: [PATCH 1/2] Changed XrmQuery default API version to be based on CRM Version of the model driven app instead of being hardcoded to 9.2 in the TS "sourcefile" for the XrmQuery JS files --- src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts b/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts index b787841372..0fee7ffffd 100644 --- a/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts +++ b/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts @@ -1379,7 +1379,7 @@ namespace XQW { * @internal */ export let ApiUrl: string | null = null; - const DefaultApiVersion = "9.2"; + const DefaultApiVersion = Xrm.Utility.getGlobalContext().getVersion().split('.').slice(0, 2).join('.'); export function getDefaultUrl(v: string) { return getClientUrl() + `/api/data/v${v}/`; From e0b398140a1b186852d3fa0f32b3df24e21a249d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Aagaard=20S=C3=B8e=20Larsen?= Date: Thu, 11 Jan 2024 15:49:55 +0100 Subject: [PATCH 2/2] changed '.' to "." --- src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts b/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts index 0fee7ffffd..eeb028f66e 100644 --- a/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts +++ b/src/XrmDefinitelyTyped/Resources/dg.xrmquery.web.ts @@ -1379,7 +1379,7 @@ namespace XQW { * @internal */ export let ApiUrl: string | null = null; - const DefaultApiVersion = Xrm.Utility.getGlobalContext().getVersion().split('.').slice(0, 2).join('.'); + const DefaultApiVersion = Xrm.Utility.getGlobalContext().getVersion().split(".").slice(0, 2).join("."); export function getDefaultUrl(v: string) { return getClientUrl() + `/api/data/v${v}/`;