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
0
Comments
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...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
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..
Sr. Software Engineer
India
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
http://www.BiloBeauty.com
http://www.autismspeaks.org