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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 2
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);
I have the same question (0)
  • Martin Dráb Profile Picture
    237,807 Most Valuable Professional on at
    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?
  • CU09090747-0 Profile Picture
    2 on at
    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
    237,807 Most Valuable Professional on at
    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.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans