Solved

Starting Order Number More Than 6 digits

  • 28 September 2022
  • 10 replies
  • 172 views

Userlevel 4

10.2.700 being DMT-loaded in a re-implementation from Vantage 5.

The starting order number, XaSyst.StartOrderNum has only six digits, although order numbers are allowed with up to nine digits.  I need new orders in the target E10 system to start 1870001 which is a seven digit number.

Help says the new order numbers generated will be the greater of StartOrderNum or 1 + the last order’s number on file.  However this doesn’t actually seem to be happening.  When I DMT-load orders such as 1639663, they now exist in the new system, but when I create a new order in Order Entry, the numbers created are in sequence of my earlier test orders which I’ve deleted.  In other words, I earlier entered and deleted five orders and Order Entry creates order 6, even with seven-digit order numbers already loaded into the system.

Does anyone know where this sequence is being maintained, and how I can force an order into the system with a specific order number?  Thanks much!

icon

Best answer by Tim.Berryman 29 September 2022, 01:32

View original

10 replies

Userlevel 1

You should be able to set this in company configuration.  Go to modules / sales / order and you’ll find the starting order number there.

Userlevel 1

I just tried it and it is limited to 6 characters.  Hmm.

 

Userlevel 1

The OrderHed.OrderNum field is an integer type.  I’d suggest customizing the company configuration screen to increase the allowed input size.

Userlevel 4

Thanks John!  I tried that, but the field is linked to XaSyst.StartOrderNum which is only six digits.

Userlevel 4

Also, wondering in what field of what table, Epicor maintains the “last order number” which stays in place regardless of whether the last order gets deleted, and which doesn’t take DMT-loaded orders into account.

Userlevel 1

It’s entirely possible that they are using a SQL query to find the MAX(OrderNum)+1

Is it in CompanySequence under OrderNumSequence there is a column of Current value.  It is probably not updated by DMT.

Userlevel 4

If they were doing the SQL thing then the higher DMT-loaded numbers would be counted.  And I see CompanySequence in the Data Dictionary but looks like that’s one they exclude from BAQs.

Userlevel 3

The format for Starting Order in Company Config can be updated by adding a new format in extended properties. This will then allow you to enter an integer longer than 6 digits.

  1. Open Extended Property Maintenance
    1. DataSet TableID: XaSyst
    2. Column: StartOrderNum
    3. Format: >>>>>>>>9 (enter the number of > you require the length of the number to be less the last 9) e.g. 1000000 is >>>>>>9
    4. Save
  2. Open Company Configuration (You will need to close and reopen the form if it’s already open. Refreshing the record will not work)
    1. Modules > Sales > Order
    2. Enter the starting Order you require (field will now accept more than 6 digits up to the length enter in StartOrderNum > format)

The help information may be a bit misleading. 

Used to establish the beginning Sales Order #. When the system generates a new order it will assign the greater of (StartOrderNum) or (the last orders # on file + 1) as the order number.

In the statement above, ‘the last orders# on file + 1 refers to the value of erp.Companysequence.OrderNumSequence + 1 and not the max(OrderHed.OrderNum).

 

The client prevents Orders from being created with a number greater than erp.CompanySequence.OrderNumSequence, however, it is possible to load orders into the system with an ordernum greater than this value.

I’ve come across this before with DMT and REST services (these may have now been fixed).

Userlevel 4

@Tim.Berryman 

Works a treat!  Thanks, Tim!

 

..Monty.

Reply