Hi,
many users in my company, use the same Super-User-ID. So you can't say which user is logged in exactly.
What i want to do is, to lock the database for user B, while user A is performing an update. But when user A and user B are using the same login, i can't use the login name. So i decided to use the windows login name as a clear definition. But i don't know how to get the windows login name.
Can you help me? :roll:
Thanks!
0
Comments
After the update, you can remove the expiration date and delete the new super-user ID.
I also thought this would be a great solution, but the problem is,
that i don't want to create more work for the user who's performing
the update. I want to create a solution which rules that automatically.
The new User ID can be created in advance. And the expiration date can be set in advance too.
im new to navision just tell me where should i write the above code?
thanq
kavi
For example, when you want to use it in a report, you should write it in the
"Report - OnPreReport" - trigger
'cause that's one of the first called triggers. So you can use the Windows Login name (if you wrote it in a global variable) in the whole report.
Hope i could help.
In most instances, you should be able to just use the USERNAME function within Navision to get it to display the current user in reports. This will work when you have separate users setup in your Navision security, unless you've got an "interesting" setup like Daniel86 *hehe*.
It would be recommended that, whenever possible, separate security setups be created for each user with a separate Navision user id (database or windows), at least in the interest of security concerns and to comply with laws like Sarbanes Oxley *waves to US friends*. Obviously this is much harder to administer, but this is easiest to maintain proper security.
Microsoft Dynamics NAV Developer