
Announcements
Hi D365 Community,
I’m working in Dynamics 365 Finance & Operations (Visual Studio / X++) and I’m trying to implement a common pattern:
Form 1 (List / grid): shows multiple records
Form 2 (Details): should open and show the currently selected record from Form 1
What I want:
A button on the list form (or a menu item button) that opens the details form.
The details form should open filtered to the record I selected in the grid (ideally using RecId).
I’m fine with using Args, calling the form, or using menu item parameters—whatever is best practice.
What I tried / where I’m stuck:
I can open the form, but it doesn’t load the selected record
Can someone please share the correct approach (best practice), and where exactly to put the code/properties?
Which object should I use for the button (MenuItemButton vs CommandButton)?
How to pass the selected record from the list form datasource (cursor) to the details form reliably?
Any small working X++ example would be really appreciated.
Thanks in advance!