Hi Martin and Andre.
First of all, thank you for pointing out about AddLink.
In regards to implementation, no problem, here's high level breakdown of the form.
The form is used to display/set defaults for a particular customer (this data is used for a webstore after). Customer Account field is unbound control on the form that allows customer selection and gets several values from d365 customer profile, like default location. InventTable brings items assigned to that customer with available inventory quantities column. I build that quantity field as a calculated column at first but business wants to filter out 0 qty so I had to think of another way and add second datasource (Table2), which adds available quantities to the grid.
Now, when different customer account is selected, default values change, including default customer location. At that time, the grid reloads with different items and should bring available quantities for the items based on the default customer location.
I hope that helps.
My issues are the following: 1. from init method I cannot see/access any form fields. When I tried to get default customer location and/or account number form fields they are empty.
2. How do I rerun the form datasource when customer account is changed on the form and pass default location so an appropriate range is added to datasource?
Thanks, Alex.