Developer forum

Forum » Integration » Order numbers created in NAV are not sequencial

Order numbers created in NAV are not sequencial

Davy Capiau
Reply

Hi,

We're using a DW10 with NAV code unit integration.

Issue:

when sequential orders are created in NAV, the numbering is not sequencial. It jumps in numbers. Example: VOR24/125172, VOR24/126402, 126402; etcc

What we've discovered:

in 1 minute the DW user changes the order number several times. Attached also an example log of entries in NAV

 


Replies

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply
This post has been marked as an answer

Hi Davy,
I have checked the file and it looks like the numbers are fine there. We don't have any code in the codeunit that is setting/changing the SalesHeader "No." field,
it iset automatically by NAV once the order is created/inserted. Maybe it is slow NAV server and too much orders are coming from Dynamicweb so NAV is generating it wrongly.
BR, Dmitrij

Votes for this answer: 1
 
Dhondt Gilles
Reply

Hi Dmitriy,

I'm the consultant on the NAV side - so happy to chime in. I have attached an unfiltered list of the Change Log Entries. These contain:
- all inserts on Sales Header
- all modifies of the 'Last No. Used' of the No. Series Line that is used for the Sales Orders

Today, 07/11, we have created 8 Sales Orders:
Which corresponds to the Sales Orders we see:

At the same time, we see 9421 modifies of the Last Used No. by the DW user. Our suspicion is the DW Cart / Order calculation / ... is triggering this modify, possibly by creating temporary Sales Headers?

We have ruled out the 'CreateOrder' parameter in cart calculation, this is always FALSE, Davy has checked this. Any ideas on what to check?

Gilles

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Gilles,
don't have anything helpful, I checked the code for the Calculate request and it only has those lines that are not forcing any numbering assignments 
salesheader.INIT;
salesheader."Document Type" := salesheader."Document Type"::Order;
salesheader."No." := '';
The nuber generation is triggerred on the SaleHeader OnInsert action:
trigger OnInsert() -> InitInsert();

Maybe you have some scheduled task that is exporting the orders to NAV?
BR, Dmitrij

 

You must be logged in to post in the forum