Skip to content

Commit

Permalink
Release v1.6.11
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksandrRogov committed Aug 19, 2020
1 parent 504d18d commit 1b4c93e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
13 changes: 10 additions & 3 deletions dist/dynamics-web-api-callbacks.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api-callbacks v1.6.10 (c) 2020 Aleksandr Rogov */
/*! dynamics-web-api-callbacks v1.6.11 (c) 2020 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -2745,21 +2745,28 @@ function DynamicsWebApi(config) {

/**
* Executes a batch request. Please call DynamicsWebApi.startBatch() first to start a batch request.
* @param request
* @param {Function} successCallback - The function that will be passed through and be called by a successful response.
* @param {Function} errorCallback - The function that will be passed through and be called by a failed response.
*/
this.executeBatch = function (successCallback, errorCallback) {
this.executeBatch = function (successCallback, errorCallback, request) {

request = request || {};

ErrorHelper.batchNotStarted(_isBatch);
ErrorHelper.callbackParameterCheck(successCallback, "DynamicsWebApi.executeBatch", "successCallback");
ErrorHelper.callbackParameterCheck(errorCallback, "DynamicsWebApi.executeBatch", "errorCallback");
ErrorHelper.parameterCheck(request, "DynamicsWebApi.executeBatch", "request");

_isBatch = false;

var onSuccess = function (response) {
successCallback(response.data);
};

_makeRequest('POST', { collection: '$batch' }, 'executeBatch', onSuccess, errorCallback);
request.collection = '$batch';

_makeRequest('POST', request, 'executeBatch', onSuccess, errorCallback);
};

/**
Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api-callbacks.min.js

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions dist/dynamics-web-api.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! dynamics-web-api v1.6.10 (c) 2020 Aleksandr Rogov */
/*! dynamics-web-api v1.6.11 (c) 2020 Aleksandr Rogov */
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
Expand Down Expand Up @@ -2274,13 +2274,20 @@ function DynamicsWebApi(config) {

/**
* Executes a batch request. Please call DynamicsWebApi.startBatch() first to start a batch request.
* @param request
* @returns {Promise} D365 Web Api result
*/
this.executeBatch = function () {
this.executeBatch = function (request) {

request = request || {};

ErrorHelper.parameterCheck(request, 'DynamicsWebApi.executeBatch', 'request');
ErrorHelper.batchNotStarted(_isBatch);

request.collection = '$batch';

_isBatch = false;
return _makeRequest('POST', { collection: '$batch' }, 'executeBatch')
return _makeRequest('POST', request, 'executeBatch')
.then(function (response) {
return response.data;
});
Expand Down
4 changes: 2 additions & 2 deletions dist/dynamics-web-api.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dynamics-web-api",
"version": "1.6.10",
"version": "1.6.11",
"description": "DynamicsWebApi is a Microsoft Dynamics CRM Web API helper library",
"keywords": [
"crm",
Expand Down

0 comments on commit 1b4c93e

Please sign in to comment.