Series no. question!!!

JTProJTPro Member Posts: 169
Hi all!!!


I'm wondering if it is possible to implement such functionality, that particular user of Navision has his own Serial no. for invoices and orders?

:-k

Best regards
Navision Application Version: 4.0SP1
Navision Database Version: 4.0

Comments

  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yep, can be done.

    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.

    :D
  • DenSterDenSter Member Posts: 8,307
    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.
  • JedrzejTJedrzejT Member Posts: 267
    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.

    that's all.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    3 different solutions for 1 problem =D>

    That's Navision :mrgreen:

    I stick with mine [-(

    Who posts solution no. 4 :shock:
  • DenSterDenSter Member Posts: 8,307
    What if the numbering series need to be used by more than one user? :-k

    Oh I know! you could add the No. Series to the User Setup Table! \:D/
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
    Yes, this is way consultants need to know exactly what a customer wants before "we" can start programming. :D
  • JTProJTPro Member Posts: 169
    TRUE TRUE

    8)
    Navision Application Version: 4.0SP1
    Navision Database Version: 4.0
  • DenSterDenSter Member Posts: 8,307
    So the short version is: yes that is possible.

    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.
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
  • DenSterDenSter Member Posts: 8,307
    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.
  • krikikriki Member, Moderator Posts: 9,118
    Something to keep in mind:

    Be carefull what you ask, you might get more answers than you want! :mrgreen:
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.