You need to sign in to do that
Don't have an account?
xiaolulu
How do I figure out sharing rules from the API
We are working on a forecasting app and we need to figure out whether the logged in user has the rights to view someone elses forecast and if yes then whos (which role/user).My questions are:
1) Is there a way to figure this out through the API. If yes how and which tables give me that info.
2) Also which tables give the security info. e.g - whether I am allowed to see someone elses data (e.g Opportunities for ppl above or below me in the hierarchy) and if yes what security permissions do i have to look at in teh API.
It would be great to get some help ont he above
Thanks
You probably want to walk the role hierarchy, which I believe you can do with the ParentRoleId in the UserRole object. Parent roles always have all the sharing privileges of their child role. User groups can also affect sharing, as pointed out above.
Hope this helps.
Is there a recommended way of figuring out the sharing rules from the API in the Summer 2010 version of Salesforce? This is an old message board post, so I'm thinking there may be a new and improved way for this in the new Salesforce release.
In other words, I need to figure out which Salesforce Accounts and Contacts a Salesforce User has access to via the API. Is this possible?
I believe "with sharing" clause appended to your Class automatically applies sharing rules for users who execute the code.
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_keywords_sharing.htm