Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Unanswered

Post the export sales order through X++ (IND)

Posted on by
I am trying to post invoice for export sales order (IND) through following code, it doesn't work. How can I post export sales order? 

SalesTable salesTable = SalesTable::find("SO-101297");
SalesFormLetter salesFormLetter = SalesFormLetter::construct(DocumentStatus::Invoice);
salesFormLetter.update(salesTable, SystemDateGet(), SalesUpdate::All, AccountOrder::None, false, true);
Categories:
  • Martin Dráb Profile Picture
    Martin Dráb 228,706 Most Valuable Professional on at
    Post the export sales order through X++ (IND)
    I'm not familiar with this "Export" checkbox, therefore I can't comment on it.
     
    Are you able to post an invoice for SO-101297 from GUI?
     
    Note that my suggestion to debug the code is still valid. You see that you can't fix the problem if all you know is that it doesn't work, therefore you need to collect more information. Debugging is the way.
  • CU09090747-0 Profile Picture
    CU09090747-0 on at
    Post the export sales order through X++ (IND)
    Hi Martin,
     
    The code processes normal sales orders (sales orders from non-foreign customers) successfully.
     
    There are no errors or warnings while running the code for export sales orders, and no SalesParmLine records are being generated. The code is running, but the invoice is not being posted.
     
    Export sales orders
    When creating a sales order for a foreign customer under IND localization, the sales order header's "Export" check box is activated.

    AX Version
    Installed product version : 10.0.39 (10.0.1860.56)
  • Martin Dráb Profile Picture
    Martin Dráb 228,706 Most Valuable Professional on at
    Post the export sales order through X++ (IND)
    Please tell us more than just "it doesn't work". First of all, describe the behaviour. For example, are you getting an exception? If so, what does the error message say and which line of code is throwing it?
     
    Then tell us what you found when you debugged your code. For example, do SalesParmLine records get generated?
     
    By the way, what do you mean by an export sales order?
     
    Which version of AX are you using?

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,572 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,706 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans