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

Regarding sharing property on object level
Hi all,
Is there any method so i can get the object' s sharing property i.e. "Private" or 'Public Read only' on sobject level, so i can do below process
if(Mycustomobj__C.IsSharing() == 'Private')
{
//so i can do global describe i can get Mycustomobj__Share and i can do my logic.this is because more logical check
}
You can access the sharing property by querying "Share" objects. Observe the saleforce.schema carefully, you will find objects like AccountShare, ContactShare, LeadShare, CaseShare, ForecastShare and some objects with the suffix "_Share" (for custom objects). In these objects you will find picklist fields like AccountAccessLevel, ContactAccessLevel, OpportunityAccessLevel and AccessLevel(for custom objects). These picklist contains the value Read Only, Read/Write and Owner. You can query these objects and find the sharing property. Find below a sample query :
Opportunity opp = [Select o.id,o.OpportunityAccessLevel From OpportunityShare o where o.OpportunityAccessLevel ='Read Only'];
Did this answer your question? if so, please mark it solved.