Skip to main content

Notifications

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Save all items in a Subgrid?

(0) ShareShare
ReportReport
Posted on by 95

I have a a subgrid that shows different product options. There is a field called "Selected Option" that basically indicates which option the client has selected. There can only be one option so I have a Javascript that will iterate through the subgrid and set all the other options to False when an option is selected to ensure we only have one option.

The script is working, However, it does not seem to save the other rows. only the one that was changed. It makes the change but after refreshing it does not save the other rows in the table. Is there a way to save all values in the Subgrid?

When I try put Xrm.Page.data.entity.save(); after my code I get an error "save in progress". 

Any ideas how I can achieve this?

  • mykedeabreu Profile Picture
    mykedeabreu 95 on at
    RE: Save all items in a Subgrid?

    Can you provide some guidance on the code for this? I am familiar with the CRM builder but not sure what the code would look like.

  • Suggested answer
    Charan Raju C R Profile Picture
    Charan Raju C R 3,155 Super User 2024 Season 1 on at
    RE: Save all items in a Subgrid?

    Hi,

    Better you update all other sub-grid records using Web API instead of row context. After updating all the records, refresh the sub-grid to show the updated field values.

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

News and Announcements

Announcing Category Subscriptions!

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 Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,370 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans