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

Add comment
 
 

 

 
 
 
Posts of the actual month
Mai 2024
MoTuWeThFrSaSu
 12345
6789101112
13141516171819
20212223242526
2728293031 
 
© 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.