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


 
 

 

 
 
 
Posts of the actual month
November 2024
MoTuWeThFrSaSu
 123
45678910
11121314151617
18192021222324
252627282930 
 
© 2006-2024 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.