How to tell what module has called the program
When using [Dynamics] [AX] is there a system function that can be used to determine which module the user was in when the program was called? I want to execute different X++ lookup code for employee, for the ProjJournalTable form, but this would be a different employee-list depending on which module is calling the form. Hope that's clear! - Maeve
There is no concept of "module" in the execution context of a form or report. Therefore there is no system function to return that. How to get around context dependant behaviour, where the behaviour depends on the caller? The usual method in say a lookup form is to inspect element.args() for one of: element.args().dataset() and/or element.args().record() element.args().parmEnumType() and element.args().parmEnum() element.args().parm() element.args().caller() element.args().parmObject() Take a look on the form LedgerAccountLookup for example, you can find many more by searching for "args" in form methods named "init".
How to lookup into another table using EDT AX 2012
Set a Date Value to a Date Field in AX2012
Determine if a job is running in X++ code
Dynamics AX 2012 parsing Int32 to table field integer
Cancel Sales order packing slip through x++
Transferring open account records between customers
How to make sure that a form is only opened once?
Extend system menu in Dynamics AX 2012?
How to show selected items of certain table on the different table in Dynamics AX 2012?
AllowEdit doesn't work properly in Dynamics AX
AX 2012 how to set args record datasource in X++
Clients seem to be running old (buggy) code after XPO project import
Number sequence AX 2012
SSRS MS words report with page break
How can you get a detailed error descriptions in Dynamics AX?
How to get the length of an array?