Find your content:

Search form

You are here

Configure Installed Package from APEX

 
Share

I have a 3rd party managed package installed. From the admin menu I can go to Installed Packages and then click Configure next to the app's name. The app has exposed several interesting settings. One of them is a checkbox named "Triggers Disabled" and I want to temporarily check that box while I'm doing some data cleanup. Worst case I'll do my cleanup off hours when few other users would be impacted by the sudden lack of functionality in the app.

But, what would be incredibly useful is to change the app's configuration setting from APEX code. Ideally it would only affect my session, but even a couple lines of APEX to change it globally would be useful because I could tack that on to the beginning and end of my cleanup script to flip the bit and flip it back when I'm done.

Possible? Please share some APEX if it is. Thanks in advance.


Attribution to: twamley

Possible Suggestion/Solution #1

The Configure link next to a managed package name is something the package creator sets up. My guess is that the link is configured to point to a visualforce page included inside the managed package.

I will also make an assumption that this visualforce page is a front end for modifying custom settings and if they are this means you may be able to alter them through code. It is possible for isv's to include protected custom settings in their packages, which are not modifiable by you.

This is all contingent on my assumptions being correct. If you are unable to discover the way the settings are saved, I would suggest getting in contact with the package owner and finding out if the settings are publicly accessible.


Attribution to: Daniel Blackhall

Possible Suggestion/Solution #2

Sometimes ISV's provide global methods in a Utility class that allow for Protected Custom Settings, particularly Checkbox fields such as your "Triggers Disabled" field, to be toggled by clients. I'd check to see if the package includes any such Utility methods. If not, you might want to suggest to the package creator that they expose a global method that toggles this setting! I think it is a good best practice for ISV's with protected custom settings to provide some Apex utility methods for modifying them as the ISV deems appropriate.


Attribution to: zachelrath
This content is remixed from stackoverflow or stackexchange. Please visit https://salesforce.stackexchange.com/questions/3832

My Block Status

My Block Content