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

Visualforce and sharing rules
Hi There,
I have added a button to an Opportunity page that takes the user directly to a VF Page.
I would like to identify if the user has write access to the Opportunity and display an error instead of the VF page if they don't.
How have others done this?
TIA
You can implement through SOQL Query in controller. Every object has its own share object like opportunityshare object having picklist field OpportunitAccessLevel Read,Read/Write and Owner.
Go through the sample code given below :
OpportunityShare = [Select o.OpportunityAccessLevel From OpportunityShare o where OpportunityAccessLevel='Read/write'];
Hope this helps.