Releases: AleksandrRogov/DynamicsWebApi
Releases · AleksandrRogov/DynamicsWebApi
v1.6.4
v1.6.3
v1.6.2
Fixes:
- Dynamics 365 Unified Interface Only: when
useEntityNames
set totrue
and a web api request is made with a collection name instead of a logical name of the entity, the request could fail because metadata for the entity cannot be found.
v1.6.1
v1.6.0
Changes:
- Parse response of a failed batch request. Important! This is a breaking change for those who use batch requests because of changes in an error parameter type which is passed in the catch callback. Starting from
v1.6.0
a parameter passed inside a catch callback of a failed batch request is an array of objects, one of those objects is the error that caused the batch to fail. Usually it is at the same index as a failed request in the batch. To get an error message, I would recommend looping though an array and checking the type of each object, for example:response[i] instanceof Error
.
dynamicsWebApi.startBatch();
dynamicsWebApi.retrieveMultiple('accounts');
dynamicsWebApi.update('00000000-0000-0000-0000-000000000002', 'contacts', { firstname: "Test", lastname: "Batch!" });
dynamicsWebApi.retrieveMultiple('contacts');
//execute a batch request:
dynamicsWebApi.executeBatch()
.then(function (responses) {
//parse response
}).catch(function (response) {
//response is an array
for (var i = 0; i < response.length; i++){
if (response[i] instanceof Error){
//error will be at the same index as the failed request in the batch
}
else{
//response of a successful request
}
}
});
v1.5.14
Fixes
- error during parsing of a batch response that contains urls with alternate keys
v1.5.13
Fixes:
- made changes to findCollectionName function to make it work in the Dynamics 365 Unified Interface
v1.5.12
Changes:
retrieveAllRequest
will include@odata.deltaLink
in the result of the request that hadtrackChanges
set totrue
.
v1.5.11
v1.5.10
Fixes:
- #55 - Avoid undefined error in batch operation. Thanks @yonaichin for a pull request.
- #56 - A required parameter cannot follow an optional parameter in TypeScript definitions.