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"
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
separate Journal Batches can also be used to differentiate users posting things
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
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.
For each template you can setup many batches - just select a journal template and click Batches:
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
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.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
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.
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-03
and in the document no instead of "MRVRC180212" (of the general journal) I want the series number "MRVRPOSA180001".
You perfectly summarize what @Slawek_Guzek tries to explain politely (I don't say you're not polite )