Hi expert, a quick question. When the user logs into the Navision and once he(she) enters the only sales order number, is there any way for the system to record the user id automatially
to the open sales order?
Thank you!
OR you can also save the user ID in same table Sales Header by adding two new fields 'Created By' & 'Modified By' & code write on OnInsert trigeer & OnModify trigger as follow :
OnInsert ()
"Created By" := USERID;
OnModify()
"Modified By" := USERID
But It saves only single user details not maintain history which can you get from Change log.
But again the performance wise it will load on your server by setting change log.
The answer with the change log or the code in the OnModify or OnInsert trigger works when someone creates or modifies a record. Maybe I misread the question, but I understood the question as "can the user id be recorded when someone opens the sales order". This would mean that you would have to add a field to the sales header as described in the previous reply, but add some code to the "OnAfterGetRecord" trigger to save the user id. However, this would also only save the last person reading the record and only if the record is read from this page.
Peter Zentner
NAV Practice Manager at Clients First Business Solutions
Comments
Yes, your right bbrown;
OR you can also save the user ID in same table Sales Header by adding two new fields 'Created By' & 'Modified By' & code write on OnInsert trigeer & OnModify trigger as follow :
OnInsert ()
"Created By" := USERID;
OnModify()
"Modified By" := USERID
But It saves only single user details not maintain history which can you get from Change log.
But again the performance wise it will load on your server by setting change log.
Thanks,
Kavita Manish Mutha
Kavita Mutha
NAV Practice Manager at Clients First Business Solutions
Did you check out our free training videos at www.dynamics-nav-training.com?
Look at our blogs.