Loop through Grid Selected records :AX2012 : X++ code to access marked records on a form

This code is for select multi record and click on button then that records fields update in to child and parent table

1. Add a new button on the form.
2. Set property “MultiSelect” to Yes.
3. Override the clicked method of the button and code as shown below :

Inside the for loop you can write the logic which you want to process.