web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Purchase Order confirmation issue

(0) ShareShare
ReportReport
Posted on by

Hi All,

I am trying to confirm a PO from the code using the below snipet

private void actionConfirmPO(PurchId purchId)
{
PurchFormLetter purchFormLetter;
PurchTable purchTable;

purchTable = PurchTable::find(purchId);

purchFormLetter = PurchFormLetter::construct(DocumentStatus::PurchaseOrder);

purchFormLetter.update(purchTable,'',systemDateGet(),PurchUpdate::All,AccountOrder::None,NoYes::No,NoYes::No);
}

 


It works fine in terms of confirming the PO, however when I am checking Purchase Order Confirmations in the Journal section, in the overview tab - instead of one entry I am getting all lines from the PO and Purchase Journal suffix is not incrementing (PO-XXX-1, PO-XXX-2...etc).

Surely I am missing something. Could you please advise.

Best Regards

*This post is locked for comments

I have the same question (0)
  • Vilmos Kintera Profile Picture
    46,149 on at

    I am unsure what you mean. If you post the PO and do not specify which lines you want to process, it will go with the whole PO producing a single confirmation, with multiple lines. You did select PurchUpdate::All to do it for all unconfirmed lines.

  • Community Member Profile Picture
    on at

    Hi Vilmos,

    Thanks for you reply.

    The problem is that I am getting confirmation for each posted line not just single confirmation.

  • Vilmos Kintera Profile Picture
    46,149 on at

    Must be some parameter/posting setting that i cannot recall from the top of my head, you could just debug the posting engine to see where does it fork off to multiple journals.

  • Community Member Profile Picture
    on at

    Thanks Vilmos.

    When I am confirming using UI it is creating the single confirmation so I am not sure why this is different when doing it via code. I try debug and see what I can find.

  • Community Member Profile Picture
    on at

    Hi,

    Found and fixed issue with multiple confirmations created - it was other part of my code causing this problem. Still cannot resolve issue with Purchase Journal number not incrementing.

    Regards

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 24

#2
Michel ROY Profile Picture

Michel ROY 14

#3
Jagadabi Profile Picture

Jagadabi 6

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans