Trigger script onsave of a editable subgrid

Question Status

Suggested Answer
sathish1109 asked a question on 13 Aug 2017 12:15 AM

Hi

   I have an editable subgrid. I want to trigger an script onSave of the grid after changing the content of records in the grid. How to trigger a script on save event of the grid?

Reply
Suggested Answer
Abhinav Ranjan responded on 13 Aug 2017 12:28 AM

You can refer to given link for registering events on Editable Grids.

community.dynamics.com/.../events-in-dynamics-365-editable-grid

Reply
Suggested Answer
Aric Levin responded on 13 Aug 2017 1:28 AM

Navigate to you grid properties, click on the events tab. In the event drop down, change the Event to OnSave.

Add the library and the function that you want to use on the OnSave event.

If you need to use your CRM execution context, make sure to check that checkbox in the Add library popup.

Reply
Suggested Answer
Sandeep Kumar responded on 18 Aug 2017 5:41 AM

Just go to Form Editor.

Click your grid and click properties button on top of the form editor window.

Go to Events Tab.

Open Event Dropdown from the list.

Select "OnSave" option.

In the grid next to this dropdown, Click "Add" button and write a function name, which you want to use and Click save.

Click on Edit Library, and paste your function code in the popup.

Just make sure that the function name you chosen in the previous step must be in your code.

Click Ok, Save and Publish.

Please mark my answer as verified, if it solves your query.

Thanks

Reply
Suggested Answer
Abhinav Ranjan responded on 13 Aug 2017 12:28 AM

You can refer to given link for registering events on Editable Grids.

community.dynamics.com/.../events-in-dynamics-365-editable-grid

Reply
Suggested Answer
Aric Levin responded on 13 Aug 2017 1:28 AM

Navigate to you grid properties, click on the events tab. In the event drop down, change the Event to OnSave.

Add the library and the function that you want to use on the OnSave event.

If you need to use your CRM execution context, make sure to check that checkbox in the Add library popup.

Reply
Suggested Answer
Sandeep Kumar responded on 18 Aug 2017 5:41 AM

Just go to Form Editor.

Click your grid and click properties button on top of the form editor window.

Go to Events Tab.

Open Event Dropdown from the list.

Select "OnSave" option.

In the grid next to this dropdown, Click "Add" button and write a function name, which you want to use and Click save.

Click on Edit Library, and paste your function code in the popup.

Just make sure that the function name you chosen in the previous step must be in your code.

Click Ok, Save and Publish.

Please mark my answer as verified, if it solves your query.

Thanks

Reply