Sunday, November 16, 2008

Financial posting in dynamics ax

Question: How to use the exisitng posting to ledger API. Is there any documentation available.

Answer: The API documentation can be found at http://download.microsoft.com/download/d/b/a/dba4455a-25c1-495c-bad2-3b316e0e2434/PostToLedger.pdf . Also I have written a blog entry for this you can check that out as well.

Friday, November 14, 2008

Inside Dynamics AX 4.0 Free eBook download at microsoft

The best technical resource available for Dynamics AX 4.0 programming is available for free download. Please download it from here . It is a must read.

How to catch key stokes in Dynamics AX

Question: I want to catch key strokes from the dynamcis ax form. How can I do it?
Answer: Override the task() method of the form and add a case in the switch method to check the keystroke. The task macro is available in the macro library that can be used to catch different events.

Friday, November 7, 2008

LIKE statement in Dynamcis AX

Question: How can we use like statement in Dynamics AX.
Answer: We can use 'like' clause in Dynamics AX statement by using '*' in the wild cards.
static void likeStatement(Args _args)
{
CustTable custTable;
;
while select custTable where custTable.Name like '*The*'
{
print custTable.Name;
}
pause;
}

In order to use linke statement in query use the '*' wild card in the query ranges. Something like the following,
static void likeQuery()
{
Query query = new Query();
QueryRun queryRun;
;
query.addDataSource(tableNum(CustTable)).addRange(fieldNum(CustTable, AccountNum)).value('400*');
queryRun = new QueryRun(query);
if(queryRun.next()) {
purchTable = queryRun.get(tableNum(CustTable));
print custTable.AccountNum;
pause;
}