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, ...
Answered

create sales order by x++

(0) ShareShare
ReportReport
Posted on by 2,050

greeting everyone 

i want create button to let user crate sales order automatic and skip this screen 

pastedimage1601296083722v1.png

i'll pass above info by code how can i do that?

and then i want show me this form for sales order

pastedimage1601296234658v2.png

 i see many codes but all inserted line of sales order

but i need from user to insert the line of sales order

here my code working fine but not show me form of sales order

NumberSeq NumberSeq;

;

NumberSeq =NumberSeq::newGetNum(SalesParameters::numRefSalesId());

salesTable.SalesId = NumberSeq.num();

salesTable.initValue();

salesTable.CustAccount = "SCR0001";

salesTable.initFromCustTable();

salesTable.insert();

how can i display forms after created the sales order 

I have the same question (0)
  • Verified answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi mohammed,

    You can try something like this to display sales order form

    rgs args;
            
    args = new Args();
    args.record(salesTable);
    new MenuFunction(menuItemDisplayStr(SalesTable), MenuItemType::Display).run(args);

  • mohammed.mqi Profile Picture
    2,050 on at

    is this code will be after

    salesTable.insert();

  • Suggested answer
    Gunjan Bhattachayya Profile Picture
    35,423 on at

    Hi mohammed,

    Yes. You will need to call SalesTable with a RecId  so that the same record is opened in the table.

    You might need to implement your code within a ttsBegin ttsCommit block as well so that the data is saved into the table.

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 518 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 431

#3
Adis Profile Picture

Adis 280 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans