You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Sends an asynchronous request to retrieve records.
1490
1511
*
@@ -1512,7 +1533,7 @@ function DynamicsWebApi(config) {
1512
1533
* @param {Function} errorCallback - The function that will be passed through and be called by a failed response.
1513
1534
* @param {string} [nextPageLink] - Use the value of the @odata.nextLink property with a new GET request to return the next page of data. Pass null to retrieveMultipleOptions.
@@ -1403,7 +1403,7 @@ function DynamicsWebApi(config) {
1403
1403
* @param {string} [nextPageLink] - Use the value of the @odata.nextLink property with a new GET request to return the next page of data. Pass null to retrieveMultipleOptions.
* Sends an asynchronous request to retrieve records.
1457
+
* Sends an asynchronous request to retrieve all records.
1442
1458
*
1443
1459
* @param {Object} request - An object that represents all possible options for a current request.
1444
-
* @param {string} [nextPageLink] - Use the value of the @odata.nextLink property with a new GET request to return the next page of data. Pass null to retrieveMultipleOptions.
1445
1460
* @returns {Promise}
1446
1461
*/
1447
-
//var retrieveMultipleRequestAll = function (request) {
1448
-
1449
-
// if (nextPageLink && !request.collection) {
1450
-
// request.collection = "any";
1451
-
// }
1452
-
1453
-
// var result = RequestConverter.convertRequest(request, "retrieveMultiple", _internalConfig);
* Sends an asynchronous request to count records. IMPORTANT! The count value does not represent the total number of entities in the system. It is limited by the maximum number of entities that can be returned. Returns: Number
@@ -1509,6 +1494,27 @@ function DynamicsWebApi(config) {
1509
1494
}
1510
1495
}
1511
1496
1497
+
/**
1498
+
* Sends an asynchronous request to count records. Returns: Number
1499
+
*
1500
+
* @param {string} collection - The Name of the Entity Collection.
1501
+
* @param {string} [filter] - Use the $filter system query option to set criteria for which entities will be returned.
1502
+
* @param {Array} [select] - An Array representing the $select Query Option to control which attributes will be returned.
1503
+
* @returns {Promise}
1504
+
*/
1505
+
this.countAll=function(collection,filter,select){
1506
+
returnthis.retrieveAllRequest({
1507
+
collection: collection,
1508
+
filter: filter,
1509
+
select: select
1510
+
})
1511
+
.then(function(response){
1512
+
returnresponse
1513
+
? (response.value ? response.value.length : 0)
1514
+
: 0;
1515
+
});
1516
+
}
1517
+
1512
1518
/**
1513
1519
* Sends an asynchronous request to retrieve records.
0 commit comments