How to check the user's CRUD permissions for an object in Salesforce?

ntnng picture ntnng · May 9, 2012 · Viewed 21.6k times · Source

According to a requirement, i have to change the owner of an account if the user does not have read access to a third object.

I need a functionality similar to the isAccessible() method of Describe Field Result, but it is only available for the current logged in user.

Is there any other way to check the user's CRUD permissions for an object in Apex code?

Answer

John De Santiago picture John De Santiago · May 10, 2012

I wrote an article about this on my blog. There is a feature that was just released in version 24.0 of the API (Spring Release) that will let you do just this on a record by record basis for the current user.

Here is the link to that blog entry that goes into details: How to tell if a user has access to a record