No Series Issues with Document No.

edisonledisonl Member Posts: 25
Hi Everyone,

1.How to reused nos in a document ?

2.Example: User created 10 documents serial no Doc001 to Doc010. Working Fine.

3.User deleted 9th & 10th Document .

4.In which when User re-created 11th document it should have take the number series of Doc009 instead of Doc011.

5.Any Setup that is missed ?

Regards
1 Destination, Multiple Route

Comments

  • rhpntrhpnt Member Posts: 688
    The system writes the last used number of a series. Any new document gets the next number. By your case you simply have a gap - nothing to worry about.
  • edisonledisonl Member Posts: 25
    rhpnt wrote:
    The system writes the last used number of a series. Any new document gets the next number. By your case you simply have a gap - nothing to worry about.

    1.Thanks for replying, the 'challenging' part is getting the wrong number/ getting the wrong table for number on new document.

    2.To elaborate on this, my new document should be based on last posted numbers + 1 instead of last used numbers.

    Regards
    1 Destination, Multiple Route
  • rhpntrhpnt Member Posts: 688
    The system never takes the "wrong" number it's always the right one. You should decide what are we talking about, posted or non posted documents?
  • kitikkitik Member Posts: 230
    No setup possible, if you create a doc and then delete it, the Document No. is not used again.

    Why do you need to use all the numbers? What type of documents are you talking about?
    edisonl wrote:
    To elaborate on this, my new document should be based on last posted numbers + 1 instead of last used numbers.
    What if the user deletes Doc8 and post Doc9 and Doc10?
    If you look at the last posted one, new document gets Doc11. So Doc8 never gets re-used.

    Salut!
    Laura Nicolàs
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
  • vijay_gvijay_g Member Posts: 884
    as per standard nav No. Series update when new record insert not about posting of any document even if you want to update
    it when document post you can do it but if you look at the last posted one then problem could be
    use create 5 doc
    doc1
    doc2
    doc3
    doc4
    doc5
    and has post doc4..
    but after doc4 he is posting doc3 then what system will update?
  • edisonledisonl Member Posts: 25
    rhpnt wrote:
    The system never takes the "wrong" number it's always the right one. You should decide what are we talking about, posted or non posted documents?


    Hi kitik,

    1.Thank you for replying.

    2.The referred scenerio are based on non posted document.

    3.The fact is if document number are not reused (there isnt any issue here for non posted document creation in Journal Line),
    so in total there is a ten document on the Journal Line
    (Doc-001..Doc-008, Doc-011, Doc012).

    4.Then when all 10 documents are posted,
    there is a discontinuity of document no(Doc-001..Doc-008, Doc-011, Doc012).

    5.Will that be a series of probes by auditor for the missing document number Doc-009, Doc-010?

    Regards
    1 Destination, Multiple Route
  • edisonledisonl Member Posts: 25
    rhpnt wrote:
    The system writes the last used number of a series. Any new document gets the next number. By your case you simply have a gap - nothing to worry about.

    Hi Kitik/rhpnt,

    1.Is there a possibilities that I can group document number by certain rules? Eg: Similar Shortcut Dimension 2 & 3 Code,
    Similar Posting Date in Journal Line?

    2.When there next record have difference(s) of 3 Variable(Shortcut Dim 2, 3 Code, Posting date) , system will then auto populate
    new set of document no. using >> NoSeriesMgt.InitSeries(...);

    Regards, Edison
    1 Destination, Multiple Route
  • rhpntrhpnt Member Posts: 688
    1.Is there a possibilities that I can group document number by certain rules? Eg: Similar Shortcut Dimension 2 & 3 Code,
    Similar Posting Date in Journal Line?

    2.When there next record have difference(s) of 3 Variable(Shortcut Dim 2, 3 Code, Posting date) , system will then auto populate
    new set of document no. using >> NoSeriesMgt.InitSeries(...);

    1. Sure! With some adventurous coding and fingers crossed...

    2. I'm sorry but I don't understand what you mean.

    Edison,
    you have to accept that the number series functionality is by design and I doubt that you understand it. We still don't know what you or your customer want to achieve and what documents are we talking about.

    Regards-RH
  • kitikkitik Member Posts: 230
    edisonl wrote:
    2.The referred scenerio are based on non posted document.

    Usually posted and non posted documents use diferent series.
    For non posted documents it is normal to have missing numbers after someone deleted a header, but it's not big deal.

    When the document is posted a new Document No. is given. Since posted documents cannot be deleted, you shouldn't have missing numbers.

    This is how NAV standard works.

    Salut!
    Laura Nicolàs
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
  • rhpntrhpnt Member Posts: 688
    2.The referred scenerio are based on non posted document.

    3.The fact is if document number are not reused (there isnt any issue here for non posted document creation in Journal Line),
    so in total there is a ten document on the Journal Line
    (Doc-001..Doc-008, Doc-011, Doc012).

    4.Then when all 10 documents are posted,
    there is a discontinuity of document no(Doc-001..Doc-008, Doc-011, Doc012).

    5.Will that be a series of probes by auditor for the missing document number Doc-009, Doc-010?

    I'm sorry "edisonl" I missed one post.

    As I understand your post you have the same number series for non- and posted documents? That's a no go! The reason why is exactly what you are describing - gaps in posted documents. You should never and I mean NEVER have the same number series for non - and posted documents. Customers often end up in such scenario because they don't understand the difference between the two types of the same doc and/or the partner is unable to explain the functionality of numbering documents.
    If that's the case you should change that ASAP.
  • edisonledisonl Member Posts: 25
    Hi Everyone,

    1.Manage to resolve it already, in the first place like some advise is a no no to use No. Series in Non-Posted documents.

    2. I used incstr() to increase the value of Payment Journal Line if any line was found, system auto go to last document> retrieve last document no> incstr("doc no.")

    3.If no document was found on Payment Journal Line, we'll go check out No.Series Line, filter By Source Code/Starting Date/ Series Code and get last used No.

    4. If no last used no was found, we'll used starting no.

    5.Hopefully this works and we'll not have concurrency issues when multiple users tries to do data importing and system face duplication of document no. allocation.

    Regards
    1 Destination, Multiple Route
  • rhpntrhpnt Member Posts: 688
    Hopefully this works and we'll not have concurrency issues when multiple users tries to do data importing and system face duplication of document no. allocation.

    If that's an issue in your solution you've made a fatal mistake and should undo it ASAP for avoiding further worsening of your situation!
  • AndwianAndwian Member Posts: 627
    edisonl wrote:
    5.Will that be a series of probes by auditor for the missing document number Doc-009, Doc-010?
    I believe that the auditor just check the Posted Document No. Series, since the Order can be deleted, while the Posted Document could not be deleted.
    Regards,
    Andwian
  • rhpntrhpnt Member Posts: 688
    I believe that the auditor just check the Posted Document No. Series, since the Order can be deleted, while the Posted Document could not be deleted.

    You're wrong. Posted documents CAN be deleted. The only real reference for auditors (which really can not be easily deleted) are ledger entries.
  • kitikkitik Member Posts: 230
    Standard NAV allows to delete Posted Documents (once they are printed), but most customers ask to modify it to not be able to delete them. At least the customers I work with asked it...

    Salut!
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
  • AndwianAndwian Member Posts: 627
    rhpnt wrote:
    You're wrong. Posted documents CAN be deleted.
    kitik wrote:
    Standard NAV allows to delete Posted Documents (once they are printed)
    Is that so? I think that is because the Developer license, and the SUPER user.
    Regards,
    Andwian
  • kitikkitik Member Posts: 230
    Andwian wrote:
    rhpnt wrote:
    You're wrong. Posted documents CAN be deleted.
    kitik wrote:
    Standard NAV allows to delete Posted Documents (once they are printed)
    Is that so? I think that is because the Developer license, and the SUPER user.

    The Developer license has nothing to do with it, just try it on a Cronus database with a customer license and check it yourself.
    The SUPER rol is not mandatory. Of course the user must have the delete permission to the table.

    Salut!
    Laura Nicolàs
    Author of the book Implementing Dynamics NAV 2013
    Cursos Dynamics NAV (spanish) : http://clipdynamics.com/ - A new lesson released every day.
  • vaprogvaprog Member Posts: 1,139
    kitik wrote:
    The SUPER rol is not mandatory. Of course the user must have the delete permission to the table.
    In a standard setup only SUPER and SUPER (DATA) have permission to delete posted documents.
  • vaprogvaprog Member Posts: 1,139
    edisonl wrote:
    1.Manage to resolve it already, in the first place like some advise is a no no to use No. Series in Non-Posted documents.
    And what about Sales Header, Purchase Header ... Does NAV standard do it wrong?

    edisonl wrote:
    2. I used incstr() to increase the value of Payment Journal Line if any line was found, system auto go to last document> retrieve last document no> incstr("doc no.")

    3.If no document was found on Payment Journal Line, we'll go check out No.Series Line, filter By Source Code/Starting Date/ Series Code and get last used No.

    4. If no last used no was found, we'll used starting no.
    Adventurous, I must say!

    edisonl wrote:
    5.Hopefully this works and we'll not have concurrency issues when multiple users tries to do data importing and system face duplication of document no. allocation.
    If I understand correctly, you introduce a posted document number distinct from the original document number. Then, by all means, why don't you use a number series for this but instead invent the wheel anew, loaded with shortcommings?

    I don't know about your legislative, but in mine an auditor will want to see documents and will check whether they match the ledgers.

    Have a look at "Sales Header".OnDelete and how it calls SalesPost.DeleteHeader to see what you ought to do when using the same number series for non-posted and posted document numbers.
  • Alex_ChowAlex_Chow Member Posts: 5,063
    What's the obsession with keeping the number series in sequence anyway? From an auditing purpose, it doesn't weight too much. The only instance where this has become an issue, from my experiene, was working with a very junior (right out of college) auditor. Thankfully, the more experienced auditor showed her the light.

    Again, I'm in the US. But is the sequence of the document numbers required by law or something in your country?
  • navuser1navuser1 Member Posts: 1,329
    edisonl wrote:
    Hi Everyone,

    1.How to reused nos in a document ?

    2.Example: User created 10 documents serial no Doc001 to Doc010. Working Fine.

    3.User deleted 9th & 10th Document .

    4.In which when User re-created 11th document it should have take the number series of Doc009 instead of Doc011.

    5.Any Setup that is missed ?

    Regards

    Hi,

    may this will help...

    1. Create a table(A) and store deleted Nos entry wise.
    2. Fetch first Document No from the table (if record exist) or else NoSeriesManagement will provide you the next no.
    3. delete the Document No from the Table(A) if you are posting the same document.
    Now or Never
  • rhpntrhpnt Member Posts: 688
    navuser1 wrote:
    1. Create a table(A) and store deleted Nos entry wise.
    2. Fetch first Document No from the table (if record exist) or else NoSeriesManagement will provide you the next no.
    3. delete the Document No from the Table(A) if you are posting the same document.

    Oh, man! Some will never learn...
  • rhpntrhpnt Member Posts: 688
    Alex Chow wrote:
    What's the obsession with keeping the number series in sequence anyway? From an auditing purpose, it doesn't weight too much. The only instance where this has become an issue, from my experiene, was working with a very junior (right out of college) auditor. Thankfully, the more experienced auditor showed her the light.

    Again, I'm in the US. But is the sequence of the document numbers required by law or something in your country?

    I agree! There is no need for concurrency even in posted documents. As long as the numbers match the numbers in the ledger entries there is nothing to worry about.
    Sure there can some differences in the local legislatives regarding numbering especially here in EU where in some countries bookkeeping methods from the 19th century are being used. But, as Alex stated, it all depends on what kind of auditor you get...
  • vaprogvaprog Member Posts: 1,139
    By the way, if you need your posted document numbers be without gaps and do not want to create empty documents to fill the gaps, (i.e. you insist on the numbers in the ledger beeing without gaps) you will need to assign numbers in posting functions based on a number series or on ledger entries. You will get a mess if you try to do it on journal lines.
  • navuser1navuser1 Member Posts: 1,329
    rhpnt wrote:
    navuser1 wrote:
    1. Create a table(A) and store deleted Nos entry wise.
    2. Fetch first Document No from the table (if record exist) or else NoSeriesManagement will provide you the next no.
    3. delete the Document No from the Table(A) if you are posting the same document.

    Oh, man! Some will never learn...

    what do u want to say ???
    Now or Never
  • Alex_ChowAlex_Chow Member Posts: 5,063
    navuser1 wrote:
    rhpnt wrote:
    navuser1 wrote:
    1. Create a table(A) and store deleted Nos entry wise.
    2. Fetch first Document No from the table (if record exist) or else NoSeriesManagement will provide you the next no.
    3. delete the Document No from the Table(A) if you are posting the same document.

    Oh, man! Some will never learn...

    what do u want to say ???

    He means that you'll get an error message if you post a sales document with the same document number if the entry is detected in the customer ledger entry.
  • navuser1navuser1 Member Posts: 1,329
    He means that you'll get an error message if you post a sales document with the same document number if the entry is detected in the customer ledger entry.

    Same doc no wiil never come. Read my previous post.
    Now or Never
Sign In or Register to comment.