Options

Set Series number according to user logged in

catiamatos1991catiamatos1991 Member Posts: 158
Hi everyone, I need to set a document number using the last series number used according to the user logged in the NAV system.

So I have the user1 and user2 and for the first user I want to use the series "MRVRPOS1" and for the second I want "MRVRPOS2"

echr5knqk63g.png

I thought to create a var to save the last series number and set to the document number depending of the user ID

IF USERID='LACT-MIRA-POSMR01' THEN
"Document No.":=SeriesCode;

IF USERID='LACT-MIRA-POSMR02' THEN
"Document No.":=SeriesCode;

(I know the code below is not right, is just a example of what I want)

In my page the Source Table is gen Journal Line, where the Document number is set how can I assign the document number using the Code unit 396 for series management?

Answers

  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2018-05-10
    Why can't you use standard Salesperson Code on Sales Header or Purchaser on Purchase Header to record to what user the document 'belongs to'?

    separate Journal Batches can also be used to differentiate users posting things
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    edited 2018-05-10
    I don't understand.. sorry. In my journal I don't use the sales person code.. How can I assign the series number with the code unit 396 for the series management? The document number is set in the Gen Journal Line table.
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    First and foremost - the user ID is already remembered in G/L Entry table and in G/L Register table - you can perfectly identify who posted what without using different number series or doing any modifications:

    ly9xon6uku7n.png

    If you want to further classify postings further then you can setup many journal batches.

    When someone prepares journal lines the journal batch code goes in and then ends up in registers and in ledgers - this gives you enough data to identify who posted what - providing users will keep discipline and select their own jounal batch

    You can go down to the level of one journal batch for each user if you wish - although for the purpose of identification individual postings it would be duplication of data which is already provided by out-of-the-box NAV.

    To define multiple batches start from looking into Journal Templates setup (Financial Management -> Setup -> General -> Journal Templates ). You will find a list of journal templates in there.
    kafp8wnrv2ep.png

    For each template you can setup many batches - just select a journal template and click Batches:
    pwefr5c4rn54.png

    In here you can define as many batches as you like.

    If you have more than one batch created then user may select their own to work with

    88vifq8hi553.png

    If a user post someting form a batch the journal batch code will go to G/L Entry and to G/L Register tables. But - as I mentioned - if your purpose is to be able differentiate user postings so you know who posted what then all that setup is unnnecesary as NAV already gives you that info.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    edited 2018-05-10
    I'm trying to create a receipt and I need to set the document number automatically according to the user logged in. the document number will be the last series number used. I created in journal batch new entries but i still need to assign the document number according to the user.
  • Options
    Slawek_GuzekSlawek_Guzek Member Posts: 1,690
    edited 2018-05-10
    Why need to set the document number according to the user logged? What is the 'root' purpose of that action? Certainly you don't need to do this just for sake of having different number series per different users, do you?

    I am asking because the answer depends on the question. If you really do need to have the document numbering seris assigned automatically according to the user logged in then yes you do need to do some modification. But sometimes if you look at a problem from a wider perspective the particular need (in this case requst of having differen document number series assigned automaticaly per user) is a solution to some other business problem. Often in such cases other solutions are possible - sometimes boiling down to adjusting the settings in the system.
    Slawek Guzek
    Dynamics NAV, MS SQL Server, Wherescape RED;
    PRINCE2 Practitioner - License GR657010572SG
    GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    I need to set the section of my journal in the page I've created to make my receipt.

    c0qoknpt03u7.png


    and in the document no instead of "MRVRC180212" (of the general journal) I want the series number "MRVRPOSA180001".
  • Options
    catiamatos1991catiamatos1991 Member Posts: 158
    But if I create that filter how can I set the section in my receipt (second image) ?
  • Options
    NavNabNavNab Member Posts: 181
    edited 2018-05-10
    BlackTiger wrote: »
    This design is stupid and pointless but doable

    You perfectly summarize what @Slawek_Guzek tries to explain politely :smiley: (I don't say you're not polite :wink:)

Sign In or Register to comment.