web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Update child/related e...
Power Apps
Unanswered

Update child/related entities in one REST API operation

(0) ShareShare
ReportReport
Posted on by

Hi

 

Using the organization service, it is possible to update child entities as an aggregate request, per -

https://learn.microsoft.com/en-us/power-apps/developer/data-platform/org-service/entity-operations-update-delete#update-related-entities-in-one-operation

 

Now, I am reading that the organization service endpoint may not be supported directly in future and the Web API is the preferred approach.
How can the above capability be achieved using the REST APIs?
I have have faced limitations with the REST API noted here-

https://powerusers.microsoft.com/t5/Microsoft-Dataverse/Update-Dataverse-child-entity-with-a-collection/m-p/1952841

I have the same question (0)
  • EricRegnier Profile Picture
    8,720 Most Valuable Professional on at

    Hi @Anonymous,

    Yes it's possible with the OrganizationService. And note that is not set to be deprecated anytime soon. It is actually the widely used for extending Dataverse. To acheive this there are two methods:

    1. Perform a ExecuteTransactionRequest . Set the first item (create request) of this request to the parent record (ie integrat_courseoutlines) and set a Guid, do not let the system generate one. Then the following items are the related records (more create requests) with the ID (Guid) of the parent set.
    2. Use the RelatedEntities property of the Entity object. Here's a sample:

     

     

    var accountToUpdate = new Account
    {
     Name = "Example Account - Updated",
     AccountId = _accountId
    };
    
    var relatedLettersToUpdate = new EntityCollection
    {
     EntityName = Letter.EntityLogicalName,
     Entities =
     {
     new Letter{Subject = "Letter 1 - Updated", ActivityId = _letterIds[0]},
     new Letter{Subject = "Letter 2 - Updated", ActivityId = _letterIds[1]},
     new Letter{Subject = "Letter 3 - Updated", ActivityId = _letterIds[2]}
     }
    };
    
    accountToUpdate.RelatedEntities.Add(letterRelationship, relatedLettersToUpdate);
    service.Update(accountToUpdate);

     

     


    BTW with your post in the other thread concernig Web API, did you give Batch requests a try? That will work 🙂
    Hope this helps!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 840 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 332 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 275

Last 30 days Overall leaderboard