X++ tips and tricks: Passing parameters in Microsoft Dynamics AX Args is your companion in the world of X++ tips and tricks. Args is an abbreviation for arguments. It allows you to pass information from one object to another newly created object. I utilize it frequently to pass the objects, records, strings, etc that I need to have in scope while accessing the object from another object. It’s very easy to utilize the Args class to get the desired result you’re looking for. The following example demonstrates how to create an instance of the Args class: Declaration of Args Args args = new Args(); CustTable custTable; Setting record is Args select custTable where custTable.AccountNum == ‘XXXX’ if(custTable) { args.record(custTable); } Some important methods of Args class Caller Get or sets the instance of the object that created this instance of the Args class. Name Gets and sets the name of the application object to call. Parm Gets or sets a s...
Posts
Showing posts from June, 2016