Skip to main content
Microsoft Dynamics CRM forum
Suggested answer

How to establish a JS-Webressource as an OnPostSave Event to an editable subgrid?

editSubscribe (0) ShareShare
ReportReport
Posted on by
Hi all,
 
I need to make sure that I use the new, updated data in API calls that get executed onsave of an editable subgrid.
Sadly, my script uses the old, not yet updated data when I add it as OnSave event to the editable subgrid. Is there any way to make it OnPostSave?
Attachments
  • Suggested answer
    Dengliang Li Profile Picture
    Dengliang Li Microsoft Employee on at
    How to establish a JS-Webressource as an OnPostSave Event to an editable subgrid?
    Hi,
     
    There is no asynchronous function like formContext.data.entity.save(saveOption).then(successCallback, errorCallback) in the functions of the subgrid control.
     
     
    Instead formContext.data.entity.addOnPostSave(myFunction) only applies at the form level.
     
    Best Regards,
    Dengliang Li
     

Helpful resources

Quick Links

New Blog Features Released!

Check out the new community blog features for viewers and authors…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,176 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,727 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Featured topics

Product updates

Dynamics 365 release plans