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
odieodie 

DescribeSObject to determine access

Hi,

 

What is the best way of using DescribeSObjectResult to determine if a  user has access to a custom object ?

Is it that the DescribeSObject call will fail or will I get some kind of  DescribeSObjectResult which I have to play around with to determine if the user has access?

 

thanks,

Odie

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell
if the user doesn't have read access, then the object name won't appear in the describeGlobal results, and a call to describeSObject will return an error.

All Answers

SuperfellSuperfell
if the user doesn't have read access, then the object name won't appear in the describeGlobal results, and a call to describeSObject will return an error.
This was selected as the best answer
odieodie
thanks Simon!