You need to sign in to do that
Don't have an account?
Shivateja Madipalli 18
Which Objects are displayed in PermissionSet Object Settings?
I am a noob with Salesforce, please bare with my question.
I am creating an App which enables easy edit/creation of PermissionSets on an ORG.
In this process, I am creating a tree view with Permission Sets -> Objects + Permissions -> Fields + Permissions
Step 1. I have retrieved Permission Sets with SOQL "SELECT Id,Name,Description,NamespacePrefix,UserLicenseId,CreatedDate FROM PermissionSet"
Step 2. I am retrieving Objects with "Schema.getGlobalDescribe()"
Here is my question, I am able to fetch all the objects from my ORG.
But, The Object names does not match with the Object names which we generally see in Permission Set -> Object Settings
For example,
With "Schema.getGlobalDescribe()", I get the Object Names, something like this,
Label: Contract, Name: Contract
Label: Contract History, Name: ContractHistory
Label: Order, Name: Order
Label: Order Share, Name: OrderShare
but, in Permission Set -> Object Settings I see something like this,
Accounts
App Launcher
Assets
Campaign Members
Campaigns
Cases
Chatter Coaching
Coaching
Contacts
Content Contracts
All I need is same set of Object Names as we see in "Permission Set -> Object Settings"
I read that the Object names displayed in Permission Set -> Object Settings are the whole set of Objects from ORG but, I see some of them are missing and some are different with just being singular to plural like,
From my code: "Case"
From Permission Set -> Object Settings: "Cases"
Btw, I am doing all of this in Lightning components
Thanks!
I am creating an App which enables easy edit/creation of PermissionSets on an ORG.
In this process, I am creating a tree view with Permission Sets -> Objects + Permissions -> Fields + Permissions
Step 1. I have retrieved Permission Sets with SOQL "SELECT Id,Name,Description,NamespacePrefix,UserLicenseId,CreatedDate FROM PermissionSet"
Step 2. I am retrieving Objects with "Schema.getGlobalDescribe()"
Here is my question, I am able to fetch all the objects from my ORG.
But, The Object names does not match with the Object names which we generally see in Permission Set -> Object Settings
For example,
With "Schema.getGlobalDescribe()", I get the Object Names, something like this,
Label: Contract, Name: Contract
Label: Contract History, Name: ContractHistory
Label: Order, Name: Order
Label: Order Share, Name: OrderShare
but, in Permission Set -> Object Settings I see something like this,
Accounts
App Launcher
Assets
Campaign Members
Campaigns
Cases
Chatter Coaching
Coaching
Contacts
Content Contracts
All I need is same set of Object Names as we see in "Permission Set -> Object Settings"
I read that the Object names displayed in Permission Set -> Object Settings are the whole set of Objects from ORG but, I see some of them are missing and some are different with just being singular to plural like,
From my code: "Case"
From Permission Set -> Object Settings: "Cases"
Btw, I am doing all of this in Lightning components
Thanks!
You may be using getName() in Schema.getGlobalDescribe object, It will reutrn you object name but in Permission set you are getting plural form of object.
Try getLabelPlural() instead of getName() if you want same name as in permission set
Thanks
Ajay Rawat
I am not using getName(), I am using getLabel().
but, even after using getLabelPlural(), This is what I am getting.
This is the output I see when using, Schema.getGlobalDescribe with getLabelPlural()
- Object Name: Contracts
- app.js:44 Object Name: Contract History
- app.js:44 Object Name: Contract Feed
- app.js:44 Object Name: Orders
- app.js:44 Object Name: Order Share
- app.js:44 Object Name: Order History
- app.js:44 Object Name: Order Feed
- app.js:44 Object Name: Order Products
- app.js:44 Object Name: Order Product History
- app.js:44 Object Name: Order Product Feed
- app.js:44 Object Name: Contract Contact Role
- app.js:44 Object Name: Opportunity Stage
- app.js:44 Object Name: Lead Status Value
- app.js:44 Object Name: Case Status Value
- app.js:44 Object Name: Solution Status Value
- app.js:44 Object Name: Partner Role Value
- app.js:44 Object Name: Task Priority Value
- app.js:44 Object Name: Task Status Value
- app.js:44 Object Name: Contract Status Value
- app.js:44 Object Name: Record Types
- app.js:44 Object Name: Business Process
- app.js:44 Object Name: Organizations
- app.js:44 Object Name: Mail Merge Template
- app.js:44 Object Name: Custom S-Controls
- app.js:44 Object Name: Documents
- app.js:44 Object Name: Folders
- app.js:44 Object Name: Email Status
- app.js:44 Object Name: Custom Buttons or Links
- app.js:44 Object Name: Email Templates
- app.js:44 Object Name: Document Entity Map
- app.js:44 Object Name: Letterheads
- app.js:44 Object Name: Names
- app.js:44 Object Name: Recently Viewed
- app.js:44 Object Name: Login History
- app.js:44 Object Name: Login IP
- app.js:44 Object Name: Client Browser
- app.js:44 Object Name: Votes
- app.js:44 Object Name: Zones
- app.js:44 Object Name: Aggregate Result
- app.js:44 Object Name: Campaigns
- app.js:44 Object Name: Campaign Share
- app.js:44 Object Name: Campaign Feed
- app.js:44 Object Name: Campaign Member Status
- app.js:44 Object Name: Campaign Members
- app.js:44 Object Name: Accounts
- app.js:44 Object Name: Account Share
- app.js:44 Object Name: Account History
- app.js:44 Object Name: Account Feed
- app.js:44 Object Name: Contacts
- app.js:44 Object Name: Contact Share
- app.js:44 Object Name: Contact History
- app.js:44 Object Name: Contact Feed
- app.js:44 Object Name: Leads
- app.js:44 Object Name: Lead Share
- app.js:44 Object Name: Lead History
- app.js:44 Object Name: Lead Feed
- app.js:44 Object Name: Opportunities
- app.js:44 Object Name: Opportunity Share
- app.js:44 Object Name: Opportunity Field History
- app.js:44 Object Name: Opportunity Feed
- app.js:44 Object Name: Opportunity Contact Role
- app.js:44 Object Name: Opportunity History
- app.js:44 Object Name: Opportunity Product
- app.js:44 Object Name: Opportunity: Competitor
- app.js:44 Object Name: Partner
- app.js:44 Object Name: Account Partner
- app.js:44 Object Name: Opportunity Partner
- app.js:44 Object Name: Forecast Share
and many more. where as, in Salesforce Permission Set -> Object Settings- Accounts
- App Launcher
- Assets
- Campaign Members
- Campaigns
- Cases
- Chatter
- Coaching
- Coaching
- Contacts
- Content
- Contracts
- D&B Companies
- Dashboards
- Data.com
- Documents
- Duplicate Record Items
- Duplicate Record Sets
- Events
- Expenses
- Feedback
- Feedback Questions
- Feedback Question Sets
- Feedback Requests
- Feedback Templates
- Files
- Forecasts
- Global
- Goal Links
- Goals
- Goals
- Groups
- Home
- Ideas
- Leads
- Libraries
- Macros
- Metric Data Links
- Metrics
- Opportunities
- Opportunity Product
- Order Products
- Orders
- Outlook
- People
- Performance Cycles
- Price Book Entries
- Price Books
- Products
- Profile
- Profile Coaching
- Profile Feed
- Profile Feedback
- Profile Goals
- Profile Overview
- Push Topics
- Reports
- Site.com
- Social Personas
- Solutions
- Streaming Channels
- Subscriptions
- Tasks
- User Provisioning Requests
- Users
which are comparatively less and different. like, some of them are different with being plural and some are missing.Example:
In the list from my code:
- Contracts
- Contract History
- Contract Feed
where as in the list from Permission Set-> Object Settings, I see onlyContracts