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
AviAAviA 

Getting user permissions level to records via API

Hello All,

I'm facing with the same problem now as it posted 2 years ago in the following link :

http://boards.developerforce.com/t5/General-Development/Getting-user-permissions-at-the-instance-level-via-API/m-p/160403/highlight/false#M36756

Does anyone know whether SF found solution for this problem?

 

Basically we have two options, but both of them are not elegant and very complicated:

- The first option is the "Try and See" option, i.e. update all the records we retrieve and separate between them according to the error response we got --> it damage our reports because it will change the LastModifyBy/Date fields.

 

- The second option is to simulate SF security mechanism per each record, which is very complicated since we need to count on the object_Share__c data which includes groups & users (recursively) and their are a lot of exceptions such as "Modify All" permission and o lot more..

 

It's really weird that SF not provides solution to support this problem, the desired solution will be to retrieve records with direct information about the user permission according to a specific record (which user? the one that made the API call of course).

 

Any piece of information will help,

Thanks in advance,

Avi.

*werewolf**werewolf*

Nope, still no means of figuring out row-by-row security other than the 2 methods you laid out.

sfdcfoxsfdcfox

Option 3: Start with a SavePoint (Database.setSavePoint), perform your DML operations, check for success/failure, then roll back your changes. You get the benefits of using salesforce.com-defined security without damaging your reports.