DynamicsWebApi is a Microsoft Dataverse Web API helper library for JavaScript & TypeScript
Fixes
name
property in a callFunction
must be optional, until functionName
is removed.Changes:
callFunction
now accepts select
and filter
parameters. #168dynamicsWebApi.startBatch();
dynamicsWebApi.create({
contentId: "1", //<-- this content id will be used in the next request
collection: "contacts",
data: {
firstname: "James",
lastname: "Doe"
}
});
dynamicsWebApi.updateSingleProperty({
contentId: "$1", //<-- using content id of the record created in a previous request
// note, that neither "collection" nor "key" is used in this request,
// contentId replaces those
fieldValuePair: { lastname: "Bond" }
});
const results = await dynamicsWebApi.executeBatch();
//results[0] will have an id of a contact record
//results[1] will be empty
Deprecations:
functionName
parameter in callFunction
is marked as deprecated and will be removed in one of the future versions. Please use name
instead.Changes:
skipNameCheck
for composable functions workaround #168Changes:
@odata.nextLink
, @odata.count
and @odata.deltaLink
to TypeScript definitions.Fixes:
nextPageLink
parameter in retrieveMultiple
. #164serverUrl
in a request url during pagination with nextPageLink
parameter in retrieveMultiple
. This only happened if serverUrl
in DynamicsWebApi config had a closing slash. #164Changes:
Changes:
await dynamicsWebApi.retrieveMultiple({ collection: "contacts", headers: { "my-header": "value" } });
Fixes:
Version 2 is out! :raised_hands: What a run... I am very excited to see how many of you will migrate and, of course, I will be happy to hear your comments and/or you have any issues with it. Special thank you to all who helped me to test the beta version of the library! :thumbsup:
v2 open discussion is here.
Forgot to include the .js.map files in this release on GitHub, so if you'd like to get them please refer to this commit.
More details about v2:
This is a beta release of v2. Thus, there can still be changes and fixes. For testing purposes only!
Fixes:
Also found a bug in Dynamics 365 with batch operations. It throws an error when multiple non-atomic operations that change data were done. A workaround there is to add a "GET" request at the end of the batch to make it work. Seems like that bug was there for a looong time already.
v2.0.0-beta.3 was not the last one, so I lied! :) Hopefully, this one will be the last!
More details about v2:
This is a beta release of v2. Thus, there can still be changes and fixes. For testing purposes only!
Fixes:
This will be the last beta release for v2. The official release will be either this weekend or next week!
More details about v2: