Passing active record to button and need to call menuitem

Is it possible to pass the production id to a button and to open a route card journal for tat id?

Based on tat id and calling a menuitem for routecard journal…

Thanks…

Passing the whole record is trivial; in fact, it happens automatically. If the target form has a main datasource with a relation to the active record, AX does even the filtering automatically. Otherwise you take the record you’ve received (element.args().record()) and do with it whatever you need.
Note that this has been discussed many times and it’s used widely in AX, therefore you should easily find more information and examples.

Wat i need is when I click the route button for that particular prodid Routecardjournal needs to open…

I need to pass the active prodid and need to open the Routecardjournal for that prodid…

Both the records are stored in ProdJournalTable, so how should i do that?