Hi,
I'm creating a sales order by code and whenever an order is created I noticed that the number sequence jummp1 each time. Example
SO1,SO2,SO4 even without errors..but manually it generates correctly.
I'm using NumberSeq::newGetNum(Sales parameters:'numRefSalesId()).num()
Hi IntegrationBeginner,
Please share your code for creating sales orders. Maybe the number sequence code is getting called twice which is why you are seeing a jump in the sales Id generated.
You can also try by commenting the code you mentioned above to see if sales orders are getting generated with the correct number sequence.
Hi Gunjan,
Commenting this line didn't create the order because SalesId needs to be filled
However, I confirm and deliver the sales order in the service as well based on some flags.
I tried to comment both confirm and deliver and the salesId was correct and in sequence. Then I added the confirm back alone but it started skipping again
Here is what I use for confirm
SalesFormLetter salesFormLetter = salesFormLetter::construct(DocumentStatus::Confirmation);
salesFormLetter.update(_salesTable, systemDateGet(), SalesUpdate::All);
Confirmation code looks fine. Maybe it's not an issue with code, but has to do more with number sequence setup.
Can you check if the sales order number sequence is being used for Confirmation number sequence under AR > Setup > AR parameters > Number sequence tab?
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
CA Neeraj Kumar 1,922
André Arnaud de Cal... 835 Super User 2025 Season 2