Skip to content

Commit 9f29d9d

Browse files
upd: dynamics-web-api-callbacks upsert request
1 parent 03c9c7d commit 9f29d9d

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

lib/dynamics-web-api-callbacks.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -544,19 +544,7 @@ function DynamicsWebApi(config) {
544544
var ifnonematch = request.ifnonematch;
545545
var ifmatch = request.ifmatch;
546546
var onSuccess = function (response) {
547-
if (response.headers['OData-EntityId'] || response.headers['odata-entityid']) {
548-
var entityUrl = response.headers['OData-EntityId']
549-
? response.headers['OData-EntityId']
550-
: response.headers['odata-entityid'];
551-
var id = /[0-9A-F]{8}[-]?([0-9A-F]{4}[-]?){3}[0-9A-F]{12}/i.exec(entityUrl)[0];
552-
successCallback(id);
553-
}
554-
else if (response.data) {
555-
successCallback(response.data);
556-
}
557-
else {
558-
successCallback();
559-
}
547+
successCallback(response.data);
560548
};
561549

562550
var onError = function (xhr) {

0 commit comments

Comments
 (0)