Really nice want to reblog it on my blog
If you want to call a form which is prefiltered you have multiple options to do so.
You can of couse use a menu item but you can also achieve this with code.
In this example we want to show all contacts which are connected to the selected customer on the address form. The idea is to create a button and call the contact form prefiltered with the current customer.
First of all you need a button on your form which is your entry point to the logic behind it. Ideally this is an unbound button-control without fancy details other than a label.
The actual logic is placed in an eventhandler. Best bet is to subscribe to the clicked-event.
As you can see the logic itself is quite simple. We get the current dirPartyTable record with the dirPartyLocation, pass it to args and call the menu item of the contacts…
View original post 17 more words