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
Kevin MoormannKevin Moormann 

Execute Workflow Rules from Apex

Is it possible to execute a workflow rule from an Apex class. 

 

For example could I query the metadata of an Opportunity and get back the array of all workflow rules (e.g., WorkflowRule[]) then execute a specific one?

 

WorkflowRule rule = WorkflowRules[0];

rule.execute();

 

Thanks in advance.

Steve :-/Steve :-/

I think you might have better luck posting this on the Apex board http://boards.developerforce.com/sforce/board?board.id=apex