3

We have created Vf page to manage custom setting data , its working well for system admin but when we logged in as internal user it throws this error :system.security.NoAccessException: Create access denied for Operations_Email_Template_Mapping__c(Custom Setting). Is there way for internal users to manage custom settings data without granting them 'Customize Application' permission??

1

The only way I can think of would be to write the information to a custom object which mirrors the fields on your custom setting that you're going to allow editing by your users, then use a trigger to update the custom settings whenever they're edited by your users.

| improve this answer | |
  • You're close, but you don't need the extra level of indirection. You just need to go to system mode, which is what "without sharing" is used for. – sfdcfox May 21 '15 at 14:12
  • Since triggers run without sharing, that was why I immediately went there, the down-side being an extra object is involved. But, I see your point. In either scenario, he'll still need to control access to the VF page for users he wants to give permission to manage custom settings. – crmprogdev May 21 '15 at 14:47
1

Normally, you'd simply update those settings in a "without sharing" utility class. Configuration pages are one of the few places where it might make sense to use "without sharing."

This is particularly true for hierarchy settings, where each user might set their own preferences. The typical use cases for list custom settings means you should probably restrict those types of custom settings just to system administrators.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.