4

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.

2 Answers 2

3

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.

2
  • 2
    If you enable Debug logs for your session and then use the page, you should then be able to inspect the debug logs for query / dml activity to learn more about where this setting is being stored. Oct 30, 2012 at 7:53
  • Looks like its a protected custom setting. Thanks for pointing me in the right direction.
    – twamley
    Oct 30, 2012 at 15:13
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .