What's new in AX 2012 - Flash news 2
Thursday, December 20, 2012
What's new in AX 2012 - Flash news 2
Consequent to this change, the enum “Blanket order” in the purchase and sales order has been removed.
Tuesday, August 19, 2008
Transactional Analysis By UdhayAnand
Hi All !
In this article, I am going to discuss about Transactional Analysis. Transactional skills is essential for every person to shine in life. In TA, we have to understand the five ego states of human being.
They are
Critical Parent - In this ego state, man criticises as and when a person makes mistakes. This is more of assertive behaviour. Also, the person in this state never tolerates wrong things and urges to correct them immediately. He tries to command and influence people in an hard way.
Nurturing Parent - He encourages poeple with warmth. Accepts others as they way they are and try to correct them during the course of their interaction in a smooth way.
Adult - Exhibits strong analytical skills at this state. However, emotions will be absent in this state. He gives an un-biased opinion subsequent to lengthy investigations.
Natural Child - In this state, creativity of one's will come out maximum. They enjoy the work at this state.
Adopted Child - Tries to adjust / co-up with others. Accepts others judgement and proceed further as such.
Wednesday, June 4, 2008
Choose a Printer Tray in Dynamics AX
The PrintJobSettings Object allows you to choose from which tray to print. First ask for the Number of trays on the printer. Notice that the returned value may not correspond to reality. It may be much bigger than the number of trays on the printer itself. Once it returned 20 for a printer with 3 trays.
int trayNums = settings.getNumberOfTrays();
Next step is try and error. Open each tray on the printer and write the number on some sheet of papers. Than you have to try what Tray ID corresponds to which tray.
Args args;
ReportRun reportRun;
PrintJobSettings settings;
int trayId;
;
args = new Args();
args.name(reportStr(MyDummyReport));
reportRun = new ReportRun(args);
settings = reportRun.printJobSettings();
settings.clearTrayPageCopy();
trayId = settings.getTray(1); // maybe 261, etc.
settings.addTrayPageCopy(trayId,1); // try from 1 .. getNumberOfTrays()
reportRun.run();
Check out what trayID value leads to what printing behaviour. Now store the (trayID | real tray number) pair in a paramter table or further use. If the printer is exchanged make sure that your ID |Tray pairs still fit.
Calling a stored procedure
Here is a piece of code to execute a stored procedure thru Axapta
static void storedProcedure(Args _args)
{
LogInProperty Lp = new LogInProperty();
CCADOConnection myConnection;
Statement myStatement;
ResultSet myResult;
;
LP.setServer("SeverName");
LP.setDatabase("DataBaseName");
Lp.setUsername("sa");
Lp.setPassword("sa");
try
{
myConnection = new OdbcConnection(LP);
}
catch
{
info("Check username/password.");
return;
}
myStatement = myConnection.createStatement();
myResult = myStatement.executeQuery('EXEC [inventtablesp]');//stored procedure name
while (myResult.next())
{
print myResult.getString(1);
}
pause;
}
Accessing Parent Datasource
element.args().record() to get the Datasource selected on the parent form.
For e.g. If you create a form named CustAdditions which is a child form to CustTable, and these two datasources are attached using dyna links and you want the selected CustTable record on child form you can write in the init method of CustAdditions
Code Snippet:
public void init()
{
CustTable custTable = element.args().record();
}
Getting number of recrods present in a query run
Use SysQuery::countloop(qr). this will return the total number of records in a query object.