x++


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".

Related Links

How to insert into a table field with value from a display method dependent of string
x++ cannot read registry entry
How do I get the caller Form's name in the Insert() of a table in AX 2012?
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

Categories

HOME
powerpoint
alarm
telegram-bot
mapbox
trac
fhir
why3
mxgraph
google-form
stellar.js
internationalization
esoteric-languages
smartclient
charles
lilypond
libigl
inno-download-plugin
highstock
mount
maze
custom-post-type
motion-detection
jackson-modules
oculus
erb
hunspell
installscript
searchkit
parse-tree
ods
visa
watchface
logback-groovy
bindingnavigator
show-hide
fwrite
lampp
gitlist
globalize
trojan
wpas
spring-data-couchbase
colorbar
edit
mach-o
py2neo
universal-analytics
iotivity
dotnetnuke-7
i386
observablecollection
project-organization
beanstalk
atan2
java-money
visual-sourcesafe-2005
sha512
keyup
theos
easyrtc
rmysql
kissfft
android-framework
maven-scm
twisted.web
bjyauthorize
web-notifications
correlated-subquery
predicatebuilder
urlrewriter
workflow-services
saxparseexception
matlab-load
rmdir
strsep
timertask
web-garden
burndowncharts
dsl-tools
lobo-cobra
sun

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App