UserID of who created the document when printing document
andy76
Member Posts: 616
Good morning,
I would like to have on print of :
- sales order
- sales quote
- purchase order
the name of the user that has created them.
Isn'it possibile?
I saw that there is probably in posted documents (invoice and shipment).
But can I have also the full name and surname in some way or only the windows user intials?
Thank you
Andy
I would like to have on print of :
- sales order
- sales quote
- purchase order
the name of the user that has created them.
Isn'it possibile?
I saw that there is probably in posted documents (invoice and shipment).
But can I have also the full name and surname in some way or only the windows user intials?
Thank you
Andy
0
Comments
-
You need to capture the USERID by maybe creating a new field in the Sales Header & linking that field to the User table to retrieve the full name when printing the reports you mentionedNAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
Idiot is right, you'll need a new field on the sales order etc to capture 'who created them'. Since those documents are working documents, and many users can contribute to them, you may want to consider if you need a modification that captures everyone who worked on the document.
In order to print the first and last name of the user, you can link the USERID to the User Setup table.0 -
You can do it like this for the User Name
Add to Sales Header Globals
User - Record - User
Add a field on the Sales Header table
Called "Created By" Type Text size 30
On the OnInsert Trigger useUser.GET(USERID); "Created By" := User.Name;
Now add the field "Created By" to the Form &/or Reports.
If you want just the code it's less work
For Example you add a field to the Sales Header Table.
Call it "Created By" type Code Size 20
then on the OnInsert trigger of the Sales Header Table you add:"Created by" := USERID;
That's it. if you add the field now to the Sales order Card you will see
when you f3 to get a new # your Userid is now stored. Since it is stored in the table now you can put it on reports.0 -
Do not forget, that if you use just table User to get the full name, it will not work when Windows Authentication is used. In this case you need to use the virtual tables accessing the AD for more info.0
-
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
