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

Compare the role of two users. How can i know who among them has the higher role?
How can i do this in apex(Class/trigger)?
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
How can i do this in apex(Class/trigger)?
Hi,
Depends on how you define higher...
If you count number of levels from your highest role - you could count the number of levels using \ based on 'Find My Salesforce Users by Role Hierarchy' by Jeff Douglas:
http://blog.jeffdouglas.com/2011/02/15/find-my-salesforce-users-by-role-hierarchy/
And compare the counters.