Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

CRM Web API Batch/Bulk operation when upsert is disabled

(0) ShareShare
ReportReport
Posted on by 10

Hi community,

we're using CRM Web API Batch operation to transfer data from an external system A to client's CRM. To make it as fast as possible we send the maximum 100 records in one HttpPost via CRM Web API. All updates were supposed to be updates, no inserts.

After a few moments we discovered that Web API does an upsert by default so that false GUIDs from System A gets created in CRM. Not good. We added header "If-Match: *" and this fixed our problem, only updates to existing records are allowed. All good thus far.

After few more moments we discovered that not all updates from System A were sent to CRM. Debug logging revealed that all those 100 records HttpPost chunks having a single non-existing GUID were discarded. Not good.

I tried to look how to gain a header set where all valid (99pcs 204's) updates would be accepted and only the non-existent records would be failed (1pc 404). https://docs.microsoft.com/en-us/powerapps/developer/common-data-service/webapi/perform-conditional-operations-using-web-api

Anyone know a way out of this?

BR, Timo

Trying avoid this: The other way is to process the answer and remove the offending GUID away from the original send.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Daivat Vartak (v-9davar) Profile Picture

Daivat Vartak (v-9d... 225 Super User 2025 Season 1

#2
Muhammad Shahzad Shafique Profile Picture

Muhammad Shahzad Sh... 106 Most Valuable Professional

#3
Eugen Podkorytov Profile Picture

Eugen Podkorytov 102

Overall leaderboard

Product updates

Dynamics 365 release plans