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
Ashutosh GurjarAshutosh Gurjar 

how to get permissionable object

i want to update the object permission. for that i want to fetch only those object whose permission we can update.
because in object describe call only we can check object is creatable,updatable etc. there is no option for permissionable check. 
Best Answer chosen by Ashutosh Gurjar
pradeep kumar yadavpradeep kumar yadav
You can check this using Metadata API by checking isLayoutable = true OR

Create Custom Metadata from this list of Objects and compare with objects fetched from GlobalDescribe and contains check :- 

Account
AccountContactRole
Asset
Campaign
CampaignMember
Case
CaseComment
CaseContactRole
Contact
ContentVersion
Contract
ContractContactRole
Event
Idea
KnowledgeArticle
Lead
Opportunity
OpportunityContactRole
OpportunityLineItem
PartnerRole
Product2
Question
Quote
QuoteLineItem
Reply
Site
Solution
Task
Territory
User
UserLicense

All Answers

Gokula KrishnanGokula Krishnan
Hi Ashutosh,

What you are asking is related to salesforce security model. You need to go through with OWD, Sharing Setting, Permission set, profile, user..etc. You can search on Salesforce security model in salesforce.

Reference:
https://help.salesforce.com/articleView?id=managing_the_sharing_model.htm&type=0
https://help.salesforce.com/articleView?id=security_sharing_owd_about.htm&type=5


Thanks,

If it helps you, please mark is as best answer, so it will be helpful for other developers.
Ashutosh GurjarAshutosh Gurjar
Hi Gokula Krishnan,
Thank you for reply , but my requirnment is that i want to fetch those object in apex through describe call whose permission we can change from the apex code. by making objectPermissions sObject record.
 
Gokula KrishnanGokula Krishnan
Hi Ashutosh,

You need to go through with Apex Managed Sharing
 https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_bulk_sharing_creating_with_apex.htm

Try on the above link.

Thanks,
pradeep kumar yadavpradeep kumar yadav
You can check this using Metadata API by checking isLayoutable = true OR

Create Custom Metadata from this list of Objects and compare with objects fetched from GlobalDescribe and contains check :- 

Account
AccountContactRole
Asset
Campaign
CampaignMember
Case
CaseComment
CaseContactRole
Contact
ContentVersion
Contract
ContractContactRole
Event
Idea
KnowledgeArticle
Lead
Opportunity
OpportunityContactRole
OpportunityLineItem
PartnerRole
Product2
Question
Quote
QuoteLineItem
Reply
Site
Solution
Task
Territory
User
UserLicense
This was selected as the best answer
Ashutosh GurjarAshutosh Gurjar
Thanks Pradeep.,,,,This is best option i think.,,