I've a custom object accessible for a custom profile cloned from Salesforce/ Standard user profile. The custom object was created using a System administrator user profile. I've granted access to this custom object for my custom profile by setting permission in Object Settings :

enter image description here

But when testing CRUD from Apex, the custom object is still not accessible from the user custom profile :

CustomObject.sObjectType.getDescribe().isAccessible() // return false

Am i doing things well or is there something i've missed regarding user permissions to custom object?

Thanks for your help,

  • Did you use System.runAs(concernedUser); in the test class or just made the concerned user run the test class? Jul 18, 2019 at 16:32
  • Yes i'm using System.runAs(concernedUser); It's really strange as the custom profile and system administrator profile privilegies are same on this custom object...and i didn't set any permission set for the user assigned to the custom profile...
    – Bryce
    Jul 18, 2019 at 16:47

1 Answer 1


Finally found out what was happening. For anyone going around here, make sure to set your custom object as Deployed to be able to set permissions on your custom object properly. enter image description here

What Is Deployment Status?

Deployment status lets you control who can access objects or platform events. We recommend that you select In Development while you set up your app or customization. That way, only admins (or users with the Customize Application permission) can access the object or platform event.

When you’re ready to grant users access, change the status to Deployed.

Later, if you change the object or platform event, select In Development again. Keep in mind that for custom or external objects, users can’t see custom tabs, related lists, or reports while objects are in development.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .