x++


How do you access a macro in the AOT macro node?


I have the following macro in the macro node of the AOT in AX 2012
#localmacro.printSettings
classStr(SrsPrintDestinationSettings), xSession::systemSessionId()
#endmacro
How can I then access this in code? Basically i want to be able to pass certain print settings to the macro and then grab those settings using the macro as well.
Macros can only manage parameters that make sense to be writed on the source code. They are not intended to receive and manage objects as parameters. If you need so, you'll need to implement a regular method, as Jan B. Kjeldsen stated on their answer.
The use of macros is all explained here.
Do not make it too complicated, if it is, you are better served using regular methods.

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
alexa-skills-kit
rdbms
themes
newrelic
carousel
web-hosting
gluon-mobile
webix
nstableheaderview
heap
pega
plist
project-intu
activecollab
cmdb
ipmitool
filechannel
articulate-storyline
squashfs
spring-async
direct3d11
roundup
jackson-modules
amazon-quicksight
android-things
gitlab-api
event-flow
kudu
turfjs
jbutton
linkedhashmap
sammy.js
login-script
hibernate-search
arduino-ide
batching
google-knowledge-graph
tex
modernizr
flatmap
password-protection
verifiable-c
setup.py
apache-stanbol
azure-arm
glm-math
smoothstate.js
contract
signal-strength
opencmis
serde
hammer.js
convex-optimization
remedy
azure-cli
java-bytecode-asm
context-sensitive-grammar
truezip
opengl-4
jqchart
oozie-coordinator
reshape
juice-ui
meteor-packages
stax
myspace
iotivity
mongodb-php
windows-azure-queues
android-wake-lock
aurora
yajsw
grass
aspen
vhosts
sapi
grgit
rate-limiting
opserver
.bash-profile
filesplitting
raygun
kissfft
rcaller
matrix-inverse
grails-plugin-rabbitmq
android-framework
multiautocompletetextview
getopt
rfc5322
octal
web-notifications
multiplexing
apache-commons-dbutils
twitterizer
presentation-layer
undefined-index
zend-rest
pagemethods
lxr
scrubyt
fdf

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App