Contents
- 1 How to automate the metadata API custom field permissions?
- 2 What does permissionsetfieldpermissions mean in the API?
- 3 What do I need to know about API permissions?
- 4 Why do we need XML deploy for custom fields?
- 5 What is included in Metadata API version 40.0?
- 6 Can a permission set grant access but not deny access?
How to automate the metadata API custom field permissions?
We are able to create the custom fields, but then the Salesforce user has to manually login to their account and set the Field-Level Security to “Visible” for each Custom Field. Is there a way to set the visibility of the field or to set the permissions for the fields we add via the Metadata or Soap API’s when we add the fields?
What does permissionsetfieldpermissions mean in the API?
PermissionSetFieldPermissions represents the field permissions for users assigned to a permission set. In API version 30.0 and later, permissions for required fields can’t be retrieved or deployed.
What do I need to know about API permissions?
Specifies an app or system permission (such as “API Enabled”) and whether it’s enabled for this permission set. In API version 28.0 and earlier, this field retrieves all user permissions, enabled or disabled. In API version 29.0 and later, this field retrieves only enabled user permissions.
How to set the visibility of a field?
Is there a way to set the visibility of the field or to set the permissions for the fields we add via the Metadata or Soap API’s when we add the fields? If you have an existing PermissionSet you can use an associated FieldPermissions to grant Read permissions. This can be done via the Partner API.
How to add custom fields to Salesforce account?
We are using the Metadata API to add Custom Fields to the Account object in Salesforce. We are able to create the custom fields, but then the Salesforce user has to manually login to their account and set the Field-Level Security to “Visible” for each Custom Field.
Why do we need XML deploy for custom fields?
The xml deploy approach allowed us to batch all of our custom fields requirements together (we were adding 40+ fields to Accounts and 10+ fields to Contacts), along with the profiles and submit them with a single deploy. Next it took us a while to figure out the structure of the deployment package.
What is included in Metadata API version 40.0?
In API version 40.0 and later, when you retrieve or deploy permission set metadata, all content exposed in Metadata API for the permission sets is included. The metadata includes Apex associated with the permission set, CRUD, and so on.
Can a permission set grant access but not deny access?
You can use permission sets to grant access but not to deny access. This type extends the Metadata metadata type and inherits its fullName field. In API version 40.0 and later, when you retrieve or deploy permission set metadata, all content exposed in Metadata API for the permission sets is included.