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

How to confirm sales line record one by one in x++

(0) ShareShare
ReportReport
Posted on by 45

Hi Team, 

can anyone tell me how to confirm sales line record one by one through x++ code.

thanx in advance.

I have the same question (0)
  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Sandhya Rani Rath,

    Could you explain what does 'confirm sales line record one by one through x++ code' mean? Could you provide more details?

  • Sandhya Rani Rath Profile Picture
    45 on at

    Hi Steve Zhao,

    it means normally when we do confirm a sales order through code, the whole order gets confirm,

    for example:

    salesorder number : so012, it has 2 lines : line1, line2

    normally when we confirm a salesorder with code the whole salesorder (so012) gets confirm.

    can we select line by line and confirm them. like confirm line1 then confirm line 2

    the code like......

    while select salesline where salestable.salesid = so012

    {

    selects the first line...then the second line..

    confirm salesline;

    }

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Sandhya Rani Rath,

    I don't quite get you. But it seems that you want to confirm each order lines rather then confirm the whole order by code. I think this can be achieved. You could get all order lines in an order. Then loop them and confirm each line is ok. So I'm not sure where are you stuck. Could you tell us your situation?

  • Sandhya Rani Rath Profile Picture
    45 on at

    HI Steve,

    Thank you for your response.

    below is the piece of code i am calling while doing the confirmation of the salesorder

           SalesFormLetter salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);

           salesFormLetter.update(_salesTable, _transDate, SalesUpdate::All, AccountOrder::None, NoYes::No, NoYes::No, NoYes::No, NoYes::Yes);

    but i am  quite not sure how can i confirm line by line.. as above code confirms the whole salesorder itself.

    can you provide me any piece of code which confirms each line.

    thanx in advance.

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

#2
André Arnaud de Calavon Profile Picture

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

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 250 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans