AX2009 - Clear the values of the variable which are packed in Runbase class

In Runbase class , you will be packing the values in classdeclaration

Eg:
public class Test extends RunBase
{
TransDate despatchDate ;
Str CustId;
Boolean accountExist;

DialogField CustId;
DialogField FromDate;

#define.CurrentVersion(3)
#localmacro.CurrentList
CustId,
despatchDate,
accountExist
#endmacro
}

In the above class, you have packed three variables (CustId,despatchDate,accountExist).

To clear the values of the above packed variable you need to use

xsyslastvalue::deleteLast(Object _Caller);

in the main method after the run has been called.

Example of main method:

public static void main(Args args)
{

Test a = new Test(); // Test is the class name, 'a' the object of class

if (a.prompt())
{
a.run();
}

xsyslastvalue::deleteLast(a); // clear the value of the packed variables
}

X++ code to find all the objects in AOT of AX2009

static void RB_AOTelements(Args _args)
{

treeNode treeNode;

xInfo xInfo = new xInfo();

#AOT

;

treeNode = xInfo.findNode(#AOTRootPath);

treeNode = treeNode.AOTfirstChild();

while(treenode)
{
Print "----------------------------------------------------------------------------------------";
Print treenode.AOTname();
pause;
treeNode = treeNode.AOTnextSibling();
}

}

X++ Code to get all the objects from the AOT

static void RB_AOTObjects1(Args _args)
{

treeNode treeNode,childNode;

TreeNodeIterator rootNodeIterator;

xInfo xInfo = new xInfo();

#AOT
#TreeNodeSysNodeType
;

treeNode = xInfo.findNode(#AOTRootPath);

treeNode = treeNode.AOTfirstChild();

while(treenode)
{
Print treenode.AOTname();
Print "----------------------------------------------------------------------------------------";
if (treeNode)
{

rootNodeIterator = treeNode.AOTiterator();
childNode = rootNodeIterator.next();
while (childnode)
{
print childNode.AOTname();
pause;
childNode = rootNodeIterator.next();
}

}
Print "------------------------------------------------------------------------------------------";
treeNode = treeNode.AOTnextSibling();
}

}

Integration of Google Map in Axapta 2009

Integrating Google Map with AX 2009 :-

I am providing the steps for the integration of google map, this is an sample one, you can make use of the same as per your requirements.

Step 1 : open the Address Form in the editable mode , go to design part

Step 2 : Add button (Button name : Google map (as you wish)) in the button group.

step 3 : Add the clicked method in the newly added button


















step 4 : Write the following code in the clicked method

void clicked()
{
super();
smmUtility::mapIt(address);
}

Step 5 : Goto the class --> "smmUtility" ----> mapIt (method)

The following Changes needs to be done in the following method.

In the mapIt method you will find the below code

#DEFINE.MapURL('http://maps.live.com/default.aspx?where1=\%1')

You need to replace the above code with

#DEFINE.MapURL('http://maps.google.com.au?q=\%1')

Now you open the address form , select anyone record which consists of address. Click the newly added button.

You can find that the new internet explorer will open with the google map page , which shows you the exact address of the AX record which you selected.

Install and Configure Zpl Printer on D365 F&O

  Setup Zpl Printer On D365 F&O Posted on Recently, I have had an opportunity review the possibilities to print license plates within D3...