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

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 646 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 285 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans