You need to sign in to do that
Don't have an account?
sindhu@demo.com
How to query the logged in User?
Hi Everyone, I have a custom field "Section__c" on "User" object and "Issue" custom object.I need a trigger to fire on creation of Issue record. When a user creates a new "Issue" record assign the value of Issue_Section__c to equal the logged in user's division (user. Section__c). How to query the logged in user ??? Thanks!!!!! Regards, Prasanna
All Answers
in your code (trigger) you can use the System method UserInfo.getUserId().
this will give you the Id of the user running the current transaction. from there you can just perform a query on the
user table with the ID you got and select the fields relevant to you.
hope this helps.
if it does, please mark it as resolved.