3

We wish to use a protected custom setting to store authentication data for a remote service we are calling. This fits with Salesforce's security guidelines. We will have to provide a Visual Force Page to allow the user to set the data, of course preventing read access to the password.

Where do we put the page? Is there any way to hook into the Custom Settings menus, or do we have to place a button or link elsewhere?

Thanks - Richard

3

You can also consider the Configure link (which can point to your VF page) next to the package on the Installed Packages page. Salesforce also recommend this here for custom settings. Once configured it looks something like this next to your package.

enter image description here

  • Thanks. I'll have to ask my company if we have one of those I can add to, or may want to create one. – Richard Corfield Jul 25 '13 at 10:01
2

I believe you will need to provide a dedicated link to access your custom Visualforce page which sets the protected custom setting.

I'll often have the Apex code that uses the custom setting check if the value has been set and then redirect the user to the Visualforce page if required.

As Richard has commented, a tab could be created to give access to the page. In some cases I've created a Setup tab with a Visualforce page that links off to all the other required setup pages.

If a minimal number of users require access to the page they could just type the address into the URL.

  • Another option could be to put the page on a tab. This could be more a question for our business analysts than for technical. I like your answer though, so could put this past them. As it is a setup I expect fewer users will have access to it than will have access to the pages that use it. We also need to provide a means to change existing settings. – Richard Corfield Jul 25 '13 at 9:26

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.