• Kevin Moormann
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 0
    Replies

Re-Posting to the Apex Board per a suggestion...(http://boards.developerforce.com/t5/Formulas-Validation-Rules/Execute-Workflow-Rules-from-Apex/td-p/272059)

 

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?

 

 

//pseudo code//

//could one perform something to the effect of...

 

WorkFlowRule[] rules = gatherRules();

 

WorkflowRule rule = WorkflowRules[0];

 

rule.execute();

 

 

 

Thanks in advance.

 

 

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.