Hi,
I have a report which generates a file. In this file I need a unique file number identifier. I've decided to set up a No. Series for this file numbering but how do I get the new number from the No. Series into my file generated by the report? I do not know how to link report to no. series (maybe it does not work this way)
Thanks for your help.
0
Comments
-codTheNumber : this will contain the newly generated no. from the no. series.
IMPORTANT: after calling this function, the table of the no. series will be blocked. So call this function as late as possible. After calling it, you should put a COMMIT to free the table again. But remember if after the COMMIT, there is some crash, the number will be used (or you have to put it back manually), even if your report hasn't finished yet.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
From the same codeunit is even shorter.
I've now run into another issue where the file is a daily file with a three digit file number (i.e. 001 to 999 files per day).
Is there a way to reset the file numbering no. series on a daily basis?
Or should I not use no. series at all e.g. create my own table and create a record for each days files?
Thank you for your help.
Be carefull not to clear the wrong one.
Then when you need a number you just check if the date in that table is today. If it isn't put the counter back to 0.
Then add 1 to the counter, save the record. And you have a new number.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!