Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Is anything wrong with my batch request?

Posted on by Microsoft Employee

Hello, guys!

I'm trying to create multiple tasks using web API.
I make request and everything seems to be fine - response with status 200 received.
But the body contains a string like `--batchresponse_s0m3-1d3nt1f1er--` and nothing else, and tasks are not created

POST [Organization URI]/api/data/v8.2/$batch HTTP/1.1
Content-Type: multipart/mixed;boundary=batch_0404c3c5da1c57fe36a677db4ae11f36
Accept: application/json
OData-MaxVersion: 4.0
OData-Version: 4.0

--batch_0404c3c5da1c57fe36a677db4ae11f36
Content-Type: multipart/mixed;boundary=changeset_dc2cc6bdfa809960ae451941a744a247

--changeset_dc2cc6bdfa809960ae451941a744a247
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID: 1

POST [Organization URI]/api/data/v8.2/tasks HTTP/1.1
Content-Type:application/json;type=entry

{"subject":"Task 1 in batch","description":"Task 1 description"}
--changeset_dc2cc6bdfa809960ae451941a744a247
Content-Type:application/http
Content-Transfer-Encoding:binary
Content-ID: 2 POST

[Organization URI]/api/data/v8.2/tasks HTTP/1.1
Content-Type:application/json;type=entry

{"subject":"Task 2 in batch","description":"Task 2 description"}
--changeset_dc2cc6bdfa809960ae451941a744a247--

--batch_0404c3c5da1c57fe36a677db4ae11f36--


*This post is locked for comments

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Is anything wrong with my batch request?

    The problem with Batch request is it may succeed in group or fail in group. So add an error handler to see if any errors.

    Refer this: community.dynamics.com/.../web-api-bulk-operations

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans