You need to sign in to do that
Don't have an account?

Get user name by SOQL
Could any one suggest that how can i get current user name and comare it with one the field of the account which has a lookup with user after trgger insert/update.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Select Id, Name From User Where Id =:UserInfo.getUserId()
1) https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_methods_system_userinfo.htm
Please try below method
UserInfo.getUsername()
other wise you can try below SOQL
Add where condition if required
Let us know if this will help you
Thanks
Amit Chaudhary