[SalesForce] how to give permission for custom setting in permission set

Here is the issue, In DE org a managed package was created and it contains custom settings in which the value is added based on user choice (values are inserted). only issue is the user's profile is not system administrator (let's say standard user)– Standard user cannot create or edit the custom settings. How should one specify the permission to insert data and mean while

if (Schema.sObjectType.MF_Primary_Objects__c.fields.Custom_Objects__c.isCreateable()){
       mffObj.Custom_Objects__c = true;
       mff.customObjects = true;
   }

since stadard user does not have permission is not creatable if i Remove the if condition everything is fine (but the security review fails )

Best Answer

Users with the "Standard User" profile can not write to Custom Settings objects. To do this you need to grant users the "Customize Application" permission and this in turn requires the View Setup Configuration permission.

From Salesforce docs: To manage, create, edit, and delete custom settings: Customize Application

Add Custom Settings Data

So if possible you can try to replace it with custom objects.

Related Topic