01 November 2015

How to get the AX info infolog value in ax 2009 / 2012 Exception handling example.

static void exceptionHandling(Args _args)
{
CustTable cust;
int i;
CustProjErrorStack custProjErrorStack;
;

try{
while select cust where cust.ABC_Approval != noyes::Yes
{
if(CustTable::find(cust.AccountNum))
{
}
}
}
catch(exception::Error)
{

for (i=1; i<=infolog.line(); i++)

{

custProjErrorStack.ErrorType = ErrorType::Error;
custProjErrorStack.Message = infolog.text(i);
custProjErrorStack.insert();

}

}
}

AXmodel file import in D365 F&O

 ModelUtil.exe -import -metadatastorepath=k:\aosservice\packageslocaldirectory -file=C:\Temp\DEST.axmodel