Maarten Vissers
Maarten Vissers

Reputation: 699

Dynamics CRM & .NET (C#) Set field value for all rows

With the help of the OrganizationService, I want to give the value of a particular column the same value for each row in a table (with a condition). How do I do that all at once?

This is how I should do it in SQL:

UPDATE [XXX]
SET Status = "Draft"
WHERE parentId = 1

Upvotes: 3

Views: 233

Answers (2)

Vahid Samimi
Vahid Samimi

Reputation: 31

This is not an official way but you can set status or other optionset field with numbers in sql. If you want to see the value of options set you must go to dynamics crm customization and see that.

Upvotes: 0

There’s no equivalent CRM SDK code to do it like your sample SQL. Because each CRM record update has to go through either service.Update() method or UpdateRequest.

Refer this SO thread for execution of bulk requests using ExecuteMultipleRequest

Upvotes: 2

Related Questions