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 :
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);
  • Martin Dráb Profile Picture
    240,785 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
    240,785 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
Martin Dráb Profile Picture

Martin Dráb 430 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 368

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 364 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans