This post is machine-translated. The original post in german language can be found here.

Create purchase order line through code

A simple example of how to create a purchase order line through code using AX<Table>-Class.

static void createPurchLine(Args _args)
{
    axPurchLine axPurchLine;
    purchLine purchLine;
   
    axPurchLine = AxPurchLine::newPurchLine(purchLine);
    axPurchLine.validateInput(true);
    axPurchLine.continueOnError(false);
   
    axpurchLine.parmPurchId("P00001");
    axpurchLine.parmItemId("1000");
    axPurchLine.parmPurchQty(10);
    axPurchLine.parmPurchPrice(24.50);
    axPurchLine.save();
}
These post applies to following versions:
Dynamics AX 2012, Dynamics AX 2009

Bruno 06/03/2015 14:14 | #1


Heinz Schweda 06/06/2015 10:23 | #2


Bruno 06/21/2015 19:57 | #3


Add comment
 
 

 

 
 
 
Posts of the actual month
Juni 2021
MoTuWeThFrSaSu
 123456
78910111213
14151617181920
21222324252627
282930 
 
© 2006-2021 Heinz Schweda | Imprint | Contact | German version | Mobile version
In order to provide you with better service, this site uses cookies. By continuing to browse the site, you are agreeing to our use of cookies.