Skip to content

Conversation

@Aagaard00
Copy link

@Aagaard00 Aagaard00 commented Jan 11, 2024

Related to issue #245

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

The possible solution i came up with was to replace

const DefaultApiVersion = "9.2";

with

const DefaultApiVersion = Xrm.Utility.getGlobalContext().getVersion().split('.').slice(0, 2).join('.');

In \src\XrmDefinitelyTyped\Resources\dg.xrmquery.web.ts which the xrmQuery files are generated from. In this way the default api version used is decided by the CRM version of the model driven app where the code is run.

Are there any issues with this solution?

Andreas Aagaard Søe Larsen and others added 3 commits January 11, 2024 15:38
…e model driven app instead of being hardcoded to 9.2 in the TS "sourcefile" for the XrmQuery JS files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants