No I would go the other way, where I would add a No Series field to the User Setup table. That way you don't have to "hack" standard functionality, all you'd need to do is change the lookup a bit during the assignment. Maybe changing the No Series management codeunit would be good if ALL numbering series would have a user, but if there's just one or two of them I would not do that.
I'm not saying Mark's suggestion is wrong, I would just approach it from a different side in this case.
I solve this with trigger Salesperson Code-OnValidate in table sales header and purch. header
Function gets the no.series from new table (Salesperson/Purchaser.Code,sales inv. series,purch. inv. series) and validate "No. series" in sales/purch header.
The long version is: you need to know exactly how this must behave (do all numbering series need a user id, do all users need a numbering series, can a numbering series have more than one user, can a user have more than one numbering series, do those numbering series apply to all functional areas or do you need separate numbering series per functional area, if so then how does that interact with the user id's, and I can think of about 25 more questions), so you can design the solution properly according to the requirements.
If the goal is to know who did which orders/invoices, you could do something simple, like add a "User ID" field (Code20) to the Sales Header table, and also to the Invoice header table, with the same field number (the same number is important). Then, in the OnInsert trigger of the Sales Header table you put one line of code:
"User ID" := USERID;
Then the posting routine will take care of everything else, without additional programming , and your Sales invoice will have the same user ID on its header record. Now you can filter the orders and the invoices on the User ID field.
Comments
Change the NoSeriesManagement codeunit
Best to create a new function with extra parameter userid, can also be global var off-course
And add a user-id field to the noseries setup table.
I'm not saying Mark's suggestion is wrong, I would just approach it from a different side in this case.
RIS Plus, LLC
Function gets the no.series from new table (Salesperson/Purchaser.Code,sales inv. series,purch. inv. series) and validate "No. series" in sales/purch header.
that's all.
That's Navision
I stick with mine [-(
Who posts solution no. 4 :shock:
Oh I know! you could add the No. Series to the User Setup Table! \:D/
RIS Plus, LLC
8)
Navision Database Version: 4.0
The long version is: you need to know exactly how this must behave (do all numbering series need a user id, do all users need a numbering series, can a numbering series have more than one user, can a user have more than one numbering series, do those numbering series apply to all functional areas or do you need separate numbering series per functional area, if so then how does that interact with the user id's, and I can think of about 25 more questions), so you can design the solution properly according to the requirements.
RIS Plus, LLC
RIS Plus, LLC
Be carefull what you ask, you might get more answers than you want!
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!