Quickly provide Field & Object Permission
Mehul Parmar
Salesforce Revenue Cloud & Apttus/Conga Specialist | Empowering Businesses to increase the ROI with QTC Solutions | Salesforce | Revenue Cloud Content Creator | Salesforce Community Contributor
Hi All,
Welcome to my new article.
We all know how much tedious process is to assign field permission and object permission to any profile or permission set.
We used to get bored doing/waiting while providing object and field permission to any particular profile or permission set.
Today we are going to see how we can provide the object and field permissions to any permission set without getting into User Interface.
We will see how easily we can provide permission of object or field using few tricks & functionalities.
Let's start with the process.
Use Case:
We have a permission set called 'Salesforce CPQ Add-On' which doesn't have object or field permission for the following objects.
For example, we have used only few objects.
In above screenshot, we can see that all the permission set doesn't have permission for the above mentioned objects.
Now follow the below mentioned steps to provide the object level permission to our permission set.
I have used Salesforce Inspector Chrome Plug-In for data query & insert, you can use any tool which supports querying data & support DML operation like Data Loader.
Provide Object Permissions
Note: Make Sure you have Use Tooling API checkbox checked.
To insert the permission for object, we have to make entries into object called 'ObjectPermissions' which has following fields.
Note: To obtain the Id of permission set, please run following query with the API name of your permission set.
In my case, the API name of permission set is 'Salesforce_CPQ_Add_On'. Replace that with the API name of your permission set in below snippet.
Select id,Name from PermissionSet where name = 'Salesforce_CPQ_Add_On'
Note: Since object 'SBQQ__ProductAttribute__c' has dependency on 'SBQQ__ConfigurationAttribute__c'. we have added Product2 object for now to avoid dependency error while insertion.
As soon as you paste the data, records will be visible as a table on the bottom screen.
领英推荐
Provide Field Permissions
Consider that we wants to provide the field permission for following objects:
Note: Make Sure you have Use Tooling API checkbox checked.
To insert the permission for object, we have to make entries into object called 'FieldPermissions' which has following fields.
Note: To obtain the Id of permission set, please run following query with the API name of your permission set.
In my case, the API name of permission set is 'Salesforce_CPQ_Add_On'. Replace that with the API name of your permission set in below snippet.
Select id,Name from PermissionSet where name = 'Salesforce_CPQ_Add_On'
As soon as you paste the data, records will be visible as a table on the bottom screen.
I hope after going through this article it will be more easier for you to provide object permission or field permission to any permission set or profile.
Feel free to reach out if you have any questions on this.
Thanks,
Mehul Parmar
CISM, CPDSE | The Detail Department | Cybersecurity for Small Business | Business Technology Consultant | Salesforce MVP HoF | Salesforce Expert
3 年Fabulous. They have done some great new features lately and more to come. I'd love to see any other posts you have about any other features of Salesforce Inspector. I use display fiekds, edit values, go to Setup, and export metadata only
CISM, CPDSE | The Detail Department | Cybersecurity for Small Business | Business Technology Consultant | Salesforce MVP HoF | Salesforce Expert
3 年Excellent use of Salesforce Inspector! Thanks! Salesforce Inspector is a free tool, but also check out Enabler4Excel that can also do Profiles (they say Permission Sets are coming) plus Create and Update fields and many other cool features. Both of these tools are indispensable in my daily Salesforce work https://www.xappex.com/docs/enabler4excel/admin-features/mass-managing-field-level-security-settings/