customized no. series

brijeshvaidyabrijeshvaidya Member Posts: 50
hello friends,

i want to create customized no. series for sales order and sales invoice as under:
1) when i will create sales order, in the no. field, automatically the no. comes from the no. series table, that i have done using :-Fill the no. series and no.series line table data for the customized no. series, but i want to add the prefix in no. with the current date, when the new sales order created or new sales invoice created, the format is:"current date-0001" should appear in the
sales order no. field, and if another SO/SI created on the same day then its incremented to -002 ans so on...

how do i achieve this...

regards,
brijesh
Brijesh Vaidya
Sr. Software Engineer
India

Comments

  • BeliasBelias Member Posts: 2,998
    Creative solution: you can create one no. series lines with starting date of the current day every day
    this can be done in the loginstart function of codeunit 1: you can check if there is the necessary no. series (the one for today) and eventually create the missing one...
    it would be better to delete old lines (for example from 01/01/06 to 31/12/06) after some time, if you're really sure you don't need them anymore!

    Anyway...what's the point of this modification?it sounds strange...
    -Mirko-
    "Never memorize what you can easily find in a book".....Or Mibuso
    My Blog
  • brijeshvaidyabrijeshvaidya Member Posts: 50
    Thank you for your reply,

    i got the solution with date functions,
    i generated the sales order no. with current date and append with no. series as under,
    but my out put is:201079-1
    and required out put must be:20100709-001

    i set the no. series 001(starting no) to 999(ending no.) for the sales order no.,

    can u suggest something..
    Brijesh Vaidya
    Sr. Software Engineer
    India
  • SavatageSavatage Member Posts: 7,142
    Thank you for your reply,

    i got the solution with date functions,
    i generated the sales order no. with current date and append with no. series as under,
    but my out put is:201079-1
    and required out put must be:20100709-001

    i set the no. series 001(starting no) to 999(ending no.) for the sales order no.,

    can u suggest something..
    You can format your date part like this
    datetext := FORMAT(WORKDATE,0,'<Year4><Month,2><Day,2>');

    then combine your two numbers together

    NoSeries := datetext+'-'+NoSeries;

    **I still stand behind the thought that a no.series should just be that. I see no real biz reason that this is necessary.

    Helpful tips:
    http://dynamicsuser.net/blogs/mark_brum ... eries.aspx
Sign In or Register to comment.