Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Answered

Batch operation - bulk update date fields.

(0) ShareShare
ReportReport
Posted on by 480

I'm trying to update multiple records using the batch operations available. I've got it working for text fields and option sets, but date fields don't seem to be working for me. Does anyone know how to format the request so my date fields update?

This works:

 

//--batch_123456
//Content-Type: multipart/mixed;boundary=changeset_BBB

//--changeset_BB
//Content-Type:application/http
//Content-Transfer-Encoding:binary
//Content-ID: id1

//PATCH /api/data/v9.2/entityname(id) HTTP/1.1
//Content-Type:application/json;type=entry

//{ "a1a_actionstatus": 548070001 }
//--changeset_BB--
//--batch_123456
//Content-Type: multipart/mixed;boundary=changeset_BBB

//--changeset_BBB
//Content-Type:application/http
//Content-Transfer-Encoding:binary
//Content-ID: id2

//PATCH /api/data/v9.2/entityname(id2) HTTP/1.1
//Content-Type:application/json;type=entry

//{ "a1a_actionstatus": 548070001 }
//--changeset_BBB--
//--batch_123456--

 


This does not work:

 

//--batch_ID12345
//Content-Type: multipart/mixed;boundary=changeset_BB

//--changeset_BB
//Content-Type:application/http
//Content-Transfer-Encoding:binary
//Content-ID: id1

//PATCH /api/data/v9.2/entityname(id1) HTTP/1.1
//Content-Type:application/json;type=entry

//{"scheduledstart":"2021-12-29T14:00:00.000Z","scheduledend":"2022-01-09T14:00:00.000Z"}
//--changeset_BB--
//--batch_ID12345
//Content-Type: multipart/mixed;boundary=changeset_BBB

//--changeset_BBB
//Content-Type:application/http
//Content-Transfer-Encoding:binary
//Content-ID: id2

//PATCH /api/data/v9.2/entityname(id2) HTTP/1.1
//Content-Type:application/json;type=entry

//{"scheduledstart":"2022-01-08T05:13:10.244Z","scheduledend":"2022-01-12T03:27:48.293Z"}
//--changeset_BBB--
//--batch_ID12345--

 

 

  • Verified answer
    skoofy5 Profile Picture
    480 on at
    Re: Batch operation - bulk update date fields.

    Thanks for the suggestion, but I did end up solving this by correctly parsing out the array I build up for the request payload in my join:

    data.join("\r\n")

     

  • MayankP Profile Picture
    462 on at
    Re: Batch operation - bulk update date fields.

    Hi @skoofy5 

     

    is this for Dateonly field? I guess in that case only date details needs to be passed for this..

     

    Refer following example for this..

     

    https://www.inogic.com/blog/2016/05/set-value-for-date-only-field-using-web-api-in-dynamics-crm-2016/

     

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Power Apps Pro Dev & ISV

#1
WarrenBelz Profile Picture

WarrenBelz 55 Most Valuable Professional

#2
mmbr1606 Profile Picture

mmbr1606 44 Super User 2025 Season 1

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 31 Super User 2025 Season 1

Overall leaderboard