Creating a custom New button

2
I have a form which contains a dataview displaying a 'PriceList' object, and the dataview also contains a datagrid displaying a series of 'PriceListItem' objects. There is an association between PriceList and PriceListItem so that when I select the default 'New' button on the embedded datagrid it creates a new PriceListItem object with a reference to the PriceList displayed on the dataview. I want to replace the 'New' button on the embedded datagrid with a custom action which will create a new object and open a popup form, plus perform some additional processing. The custom button needs to be invoked without any selection having been made, so I set the 'Invoke on' property to 'None'. However now when I select the custom 'New' button it creates a new PriceListItem object but WITHOUT the reference to the PriceList displayed on the dataview - it appears the context has been lost. Is it possible to achieve what I want? If so, how? Thanks.
asked
1 answers
3

Under the behavior tab (where you set the invoke on to "none") you will find the behavior (advanced) tab. If you put pass enclosing context to "true" here (default = false) it will correctly pass on the reference to the microflow.

pass enclosing context

answered