In this article we will be focusing on confirmation of a sales order using X++ code.
Confirm Sales Order
First we will see how do we confirm sales order from front end of Microsoft Finance and Operations and then we’ll jump over to do that process through X++ code.
I will list down the steps to do that sequentially.
- Firstly I need to open the sales order which I want to confirm and the go to Header tab and see that there is Document Status is None then click on Sell tab and click Confirm sales order button as seen in below image.
- Now click on OK button.
- Now click on OK button to confirm sales order without printing the document.
- It’ll take some time while confirming the sales order.
- Now as you see after the operation is complete this sales order is now confirmed as its Document status is now changed to Confirmation.
Confirm Sales Order using X++ code
Now we will see how to do that process through X++ code.
Use this given method below to confirm a sales order in X++ using SalesFormLetter class.
The parameter passed to this method is sales order id which needs to be confirmed.
public void salesOrderConfirm(SalesId _salesId) { SalesTable salesTable; SalesFormLetter salesFormLetter; salesTable = SalesTable::find(_salesId); salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation); salesFormLetter.update(salesTable, DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()), SalesUpdate::All); }
Thank you for reading this article hope you find it useful.
Technical Consultant
References:
Winston here from Iowa. I just wanted to see if you need an extra hand in the way of site upkeep/tweaking, adding emails to your newsletters from my targeted database (I have millions of them that you can use). I could even setup email campaigns for lead generation emailing at no extra cost to you to send out using my mail servers. Unique blog post material, extra traffic by getting others to start sharing your site across their own social media accounts, social media management, optimizing the site, create unique videos and images using Google AI, etc also help quite a bit. I can even post ads in every capital city in the country on CraigsList for any one of their 500 categories for some immediate traffic.
I have quite a few ways I can set all of this up and do this for you. I don’t mean to impose, I was just curious. I’ve been doing this for 22+ years and was just wondering if you needed any extra help.
All the best,
Winston
tel:1-319-382-0597
Aw, this was an exceptionally nice post. Finding the time and actual effort to make a top notch articleÖ but what can I sayÖ I procrastinate a whole lot and never seem to get nearly anything done.
Everyone loves what you guys tend to be up too. This type ofclever work and coverage! Keep up the great worksguys I’ve incorporated you guys to blogroll.
As a Newbie, I am always browsing online for articles that can benefit me. Thank you
Wow! This can be one particular of the most useful blogs We ave ever arrive across on this subject. Actually Magnificent. I am also an expert in this topic so I can understand your effort.
Im grateful for the blog post.Thanks Again. Want more.
I really liked your blog post.Really looking forward to read more. Fantastic.