+ Start a Discussion

Change OwnerID in Trigger

Does anybody have any recommendations or experience with changing the Owner using a Trigger (versus a workflow rule)?  I've setup a trigger that automatically "Submits" to an Approval Process based on the Owner of the record, but it looks like the trigger fires off the approval to the current owner before a Workflow rule can change the owner to who i'd like.  I don't even mind if I have to hardcode the preferred ownerid into the trigger.


In Salesforce the order of execution is :


  1. System Validation Rules
  2. Custom Validation Rules
  3. Triggers
  4. Assignment rules
  5. Auto response rules
  6. Workflows
  7. Escalation rules
  8. Send emails


So you have to redesign your trigger and workflow. Hope this helps.