cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pkbhfs
New Member

Dynamics CRM API Update a column with the same value for every row in dataset

Hello,

 

I'm trying to update a dataset to have a last refresh date.

Essentially I need a value in every single row in the data set to be updated with today's date.

 

I can patch individual's one at a time by doing a 

PATCH {{webapiurl}}dataset_name(00000000-0000-0000-0000-000000000001)

This example updates an existing account record with the dataset_name_id value of 00000000-0000-0000-0000-000000000001

with a body of 

{
   "lastrefreshdate": "2022-09-07"
}

This works but the dataset its constantly changing and I would prefer to not have to go in and query every single unique id then iterate through them to update the date or create a batch. 

 

I am wondering if I can do something where I have a 

PATCH {{webapiurl}}dataset_name
{
   "lastrefreshdate": "2022-09-07"
}

with the purpose of updating every single row's lastrefreshdate with the value "2022-09-07"

 

Does anyone know if this is possible?

 

1 REPLY 1
gowrihalan04
Helper V
Helper V

@pkbhfs I think you cant do with dataset. You have Bulk update APIs where you need to pass id and field to update. something like below

"data": [
{"crm_id": "8009df47-a07f-ea11-a811-000d3a363dd3", "lastrefresh": "date"},
{"crm_id": "8609df47-a07f-ea11-a811-000d3a363dd3", "lastrefresh": "date"}

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,608)