Search This Blog

Wednesday, October 23, 2013

How to configure the Batch Processing :


Go to --> Administration Module --> set Up --> Batch Group

Here we need to select the batch  server

Over view tab


Batch Server Tab




















Administration --> set Up --> Server configuration -->
Here we need to select the server for sending mails to users..
























Next Basic Module --> Common Forms --> Batch Job List 
























Create the new job with description and go to View Task -->
















Select the class what we wrote 
for sending Emails to users , choose the class and save it .
Go to Functions --> change status -->  change the status to waiting























Final Step is Go to Recurrences --> 
Here we can give the timings based on the time give below.





X++ Code to fetch the criteria data's from Query Window in Report Level :

Source code :

To be written in run () of report level...

public void run()
{
super();

QueryBuildRange    range;
range = queryRun.query().dataSourceTable(tablenum(CustPackingSlipJour)).range(1);
info(strfmt(" Delivery Date %1",range.value()));
}



Wednesday, October 9, 2013

To Create a Dialog box in AX 2012

Source Code:

static void Simple_Dialog(Args _args)
{
dialog dialog;
dialogGroup dialogGroup;
dialogField dialogField;
dialog = new Dialog("Simple Dialog");
dialogGroup = dialog.addGroup("Customer");
dialogField = dialog.addField(extendedTypeStr(custAccount));
if (dialog.run())
{
print dialogField.value();
pause;
}
}


To Create a New Class in AX 2012

Steps:

1. Open the AOT.
2. Find the Classes node.
3. Right-click and select New Class.
4. Expand the node for the newly created class.
5. Double-click the classDeclaration.
6. Rename the class to PrintMyName.
7. Declare a variable of type String, called "myName".
8. Press F8 to compile and save the classDeclaration.
9. Right-click the class and select New Method.
10. Double-click the new method.
11. Rename the method to "setMyName".
12. Enter the code in the setMyName method shown below into your
method.
13. Press F8 to compile and save the method.
14. Right-click the class and select New Method.
15. Double-click the new method.
16. Rename the method to "printMyName".
17. Enter the code in the printMyName method show below into your
method.
18. Press F8 to compile and save the method.

Source Code :

public class PrintMyName
{
str 20 myName;
}
private void setMyName()
{
myName = "Isaac";
}
private void printMyName()
{
print MyName;
}