This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
Dynamics AX 2012
|
|
|
|
|
|
This post is machine-translated. The original post in german language can be found here.
These post applies to following version:
Dynamics AX 2012
|
The next lines of code should show, how checking or posting of Price-/discount agreement journals is done.
{
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();
}