Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Trigger function on completion of OnChange event of editable subgrid.

(0) ShareShare
ReportReport
Posted on by 21

I have editable subgrid and rollup fields on an entity that rollups an attribute value of subgrid. On the parent entity I am refreshing the roll-up fields value on change of another field via JS.

The problem is the user after changing the value in the sub-grid directly changes the filed on which I have called the refresh roll-up function. As a result, the refresh roll-up function refreshes the roll-up value with the old value of the subgrid attribute as the grid has not yet committed its value to the back-end because user did not saved the value on subgrid.  

Is there a way i can check if the onChange event of the subgrid attribute has completed its execution and then call the refresh roll-up function ?

Thanks in advance. 

  • Tushar Profile Picture
    Tushar 21 on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Yes,

    In UCI the grid onSave is triggered  after the form onSave event. That is why the refersh rollup calculation is not taking updated value from grid.

  • Tushar Profile Picture
    Tushar 21 on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Actually we want to show the changes upfront. In case of server side user need to refresh the form.

  • Abby Kong Profile Picture
    Abby Kong 6 on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Hmmm, did the OnSave Event registered against the editable grid?

  • Suggested answer
    Bipin D365 Profile Picture
    Bipin D365 28,961 Moderator on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Hi,

    Have you tried moving your code from client side to server side?

    Write your code to refresh rollup field in plugin.

    somacrm.wordpress.com/.../

    Please mark my answer verified if i were helpful

  • Tushar Profile Picture
    Tushar 21 on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Hi Abby,

    I have tired OnSave event earlier, but it does not trigger in my scenario.

    BR,

    Tushar

  • Abby Kong Profile Picture
    Abby Kong 6 on at
    RE: Trigger function on completion of OnChange event of editable subgrid.

    Hi Tushar,

    You can call the function on onSave instead of onChange event of the editable grid.

    Regards,

    Abby

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,305 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans