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

Check/post Price-/discount agreement journals trough code

The next lines of code should show, how checking or posting of Price-/discount agreement journals is done.

static void checkOrPostPriceDiscJournal(Args _args)
{
    PriceDiscAdmCheckPost priceDiscAdmCheckPost;
    PriceDiscAdmTable priceDiscAdmTable;
    PriceDiscJournalNum priceDiscJournalNum = "PDJ-00014";

    priceDiscAdmTable = PriceDiscAdmTable::find(priceDiscJournalNum);
    if (priceDiscAdmTable.Posted)
    {
        throw error("@SYS21497");
    }

    priceDiscAdmCheckPost = new PriceDiscAdmCheckPost(true);    // true = Checkonly, false = Post
    priceDiscAdmCheckPost.initJournalNum(priceDiscJournalNum);
    priceDiscAdmCheckPost.run();
}
 
These post applies to following version:
Dynamics AX 2012

 
 

 

 
 
 
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.