function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
theitdeptrockstheitdeptrocks 

Obtain WF Rule Criteria from Apex

Hi,

 

Would it be possible to retrieve the criteria that triggers a workflow rule from within an Apex Class?  I'm wanting to display a string similar to what you see on the WF pages on a VF page:

 

(Plan Process: Plan Stage Name equals Implementation) and (Plan Process: 1st Payroll Upload Date not equal to null)

 




 

 

Best Answer chosen by Admin (Salesforce Developers) 
grigri9grigri9

No, the only way to get to wf rule criteria is through the metadata api.

All Answers

grigri9grigri9

No, the only way to get to wf rule criteria is through the metadata api.

This was selected as the best answer
theitdeptrockstheitdeptrocks

Do you have any links to reference material to do this?  I've been browsing, but can only find items for approval processes.  Any guidance through documentation or examples would be much appreciated!

grigri9grigri9

The metadata api has a workflow object that includes the criteria for a workflow rule.