delegateas / XrmDefinitelyTyped

Tool to generate TypeScript declaration files for Dynamics 365/CDS client-side coding.
http://delegateas.github.io/Delegate.XrmDefinitelyTyped/
MIT License
133 stars 53 forks source link

AssociateCollection throws error because of api version #276

Closed ibraunadesso closed 2 years ago

ibraunadesso commented 2 years ago

Describe the bug I use XrmDefinitelyTyped with on premise in version 9.1. I would like to create a n:n record by using the associateCollection function. Before I execute the function I set the api version to 9.1.

Data from network trace:

POST URL: https://url/api/data/**v9.1**/entityname(117C2BB7-67D7-EC11-A354005056BA896E)/relationshipname/$ref POST BODY: {"@odata.id":"https://url/api/data/**v9.2**/entityname(418C7D21-68F1-EC11-A35B-005056BA896E)"}

Error message: message: The URI 'url/api/data/v9.2/entityname(418C7D21-68F1-EC11-A35B-005056BA896E)' is not valid because it is not based on 'url/api/data/v9.1/'.

It seems that the api version is not set everywhere where it is necessary.

To Reproduce Steps to reproduce the behavior: Execute associateCollection function on premise with api version 9.1

Expected behavior Records are successfully associated to each other.

Environment

Is there any workaround for the moment?

misoeli commented 2 years ago

Fixed in 6.2.