Reputation: 2598
Is there any way I can execute some JavaScript code after the Dynamics CRM entity form is saved. The available OnSave event fires before the form is saved actually.
What I want to do is: to get the newly created record's id and set it on the lookup field on the opener window. For this I have:
NOTE: I am not using the built-in lookup here because I have to pass some data from the opener window to over the new record.
Upvotes: 0
Views: 3207
Reputation: 472
There is now: addMessageToOnPostSave
Back then, there was no reliable way. Keeping track of the formType changing from 1 to 2, or onchange, none of that works if they click Save & Close.
Upvotes: 1
Reputation: 11
You could attach your JavaScript function onto the OnChange event of the Modified date field.
This field will update after the form is saved.
Upvotes: 1