Skip to main content

Notifications

Microsoft Dynamics AX (Archived)

Get sales invoice data after posting invoice

Posted on by 65

Hi, for some reason I'm unable to post text on community it say an error occurred while saving the post.  So I'm adding a screenshot of my complete scenario. Do have a look and help me on this.

6574.pic1.png

*This post is locked for comments

  • Suggested answer
    Wmyk Profile Picture
    Wmyk 150 on at
    RE: Get sales invoice data after posting invoice

    Try taking a look at .parmAllJournals() on the outputContract variable.

    Here's a little method you can add to SalesFormLetter, then pass it the "outputContract" variable and inspect with the debugger.

    This code is incomplete and doesn't do any error checking, etc.

    private void processOuputContract(FormletterOutputContract _formLetterOutputContract)
    {
        Set                 allJournals = Set::create(SysOperationHelper::base64Decode(_formLetterOutputContract.parmAllJournals()));
        SetEnumerator       se = allJournals.getEnumerator();
        CustInvoiceJour     custInvoiceJour;
            
        // Add error checking and whatever logic all throughout this method
        while (se.moveNext())
        {
            custInvoiceJour = se.current();
        }    
    }


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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans