0

my requirement is to query if there are any active processes (process builder) for a particular object , but i am unable to see a way to do this.

I have used sobjects like ProcessDefinition,ProcessInstance but doesnt seem to be giving right info.

ProcessDefinition is not retrieving all the processes existing in the system not sure why.

any help on this ?

1 Answer 1

1

ProcessDefinition is related to approval process not process builder. Haven't played with this much but looks like you can access the active process builders / flows using the metadata API. https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_visual_workflow.htm

You can consume the metadata api in apex using a rest call as described here: https://github.com/financialforcedev/apex-mdapi

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.