function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dejanzivanovic[urbanhawks]dejanzivanovic[urbanhawks] 

Sharing Rules and Apex Code

I have created sharing rules, roles and users in roles. But sharing rules on custom object dont apply, on sales force object Accounts and Contact work. I have pages.

Does usage of jquery menus and java scripts on pages overrides sharing rules?

Thanks.

 

Best Answer chosen by Admin (Salesforce Developers) 
EIE50EIE50

Sharing rules apply to all standard and custom objects.

 

Make sure you include "with sharing" key word in your first line of apex class. The apex and VF pages would automatically obey the rules and dispaly the related data that the user have access to.

 

Thanks.

All Answers

EIE50EIE50

Sharing rules apply to all standard and custom objects.

 

Make sure you include "with sharing" key word in your first line of apex class. The apex and VF pages would automatically obey the rules and dispaly the related data that the user have access to.

 

Thanks.

This was selected as the best answer
dejanzivanovic[urbanhawks]dejanzivanovic[urbanhawks]

Hi,

"With sharing" key is in every class, but sharing rulles don't apply.

Thanks

 

dejanzivanovic[urbanhawks]dejanzivanovic[urbanhawks]

It's my mistake on that class there was no "With sharing"

You are right! Thanks