Releases: AleksandrRogov/DynamicsWebApi
Releases · AleksandrRogov/DynamicsWebApi
v1.6.8
1.6.7 hot fix release
Changes:
- Normalize response headers in a batch response
v1.6.7
v1.6.6
Fixes:
- Formatted values did not have aliases in expand objects.
Changes:
- Added response types to TypeScript declaration files.
v1.6.5
Changes:
- Removed limitation where
useEntityNames: truedid not work if there was no cached metadata before executing batch request.
v1.6.4
v1.6.3
v1.6.2
Fixes:
- Dynamics 365 Unified Interface Only: when
useEntityNamesset totrueand 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.0a 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