You need to sign in to do that
Don't have an account?
Interrogating Approval Process's Prior Via Apex
Is it possible to traverse the configuration objects in APEX script?
I would like run a trigger from the USER object which checks to see if the user appears on any approval configurations before I allow the user record to be made in-active (I don't mean check to see if they have OUTSTANDING approvals but I mean check if they could ever appear on ANY approvals in the future - ie. are they listed in any approval steps).
Does Salesforce expose these objects to developers? I have had a search for these objects but the only ones I can find relating to approvals relate to firing off and managing an approval process on an existing object.
Note: a bit of an APEX newbie alert (been a developer for years but new to APEX and quite new to SF). :smileyhappy:
Thanks in advance.
I believe it is not possible. I went through this recently in regard to validation rules - wanted to interrogate them in order to create test data that satisfied them (in order to have a even a hope of writing portable tests). They are not exposed to Apex.
Coming from other programming languages / environments it is easy to forget what a small yard Apex developers get to run around in. Kind of like VBA, but a little more restrictive.
All Answers
I believe it is not possible. I went through this recently in regard to validation rules - wanted to interrogate them in order to create test data that satisfied them (in order to have a even a hope of writing portable tests). They are not exposed to Apex.
Coming from other programming languages / environments it is easy to forget what a small yard Apex developers get to run around in. Kind of like VBA, but a little more restrictive.
Thanks SFCK, I feared that this would be the case after my R&D and browsing through the object model. Good to have it confirmed by somebody though before I break the news to the client.
Thanks again.
J