Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Salesforce Trigger workflow on record delete

Tags:

salesforce

I want to listen change in my legacy system whenever there is any change in SF object (add/update/delete). So I have created outbound message and workflow. But in workflow I don't see any way to fire if object is deleted.

Is there anyway I can trigger outbound message on record delete? I know have heard that it can be done by trigger. But I don't want to write apex code for this.

like image 424
user1089814 Avatar asked Jan 19 '23 02:01

user1089814


1 Answers

To the best of my knowledge it cannot be done, the workflow actions are decoupled from the workflow rule (you can even reuse them) so they probably do not receive the transaction scope and when they execute the record is already gone and any reference inside action would point to a non-existing data. Thus the only way I know how to do it is via trigger.

like image 100
mmix Avatar answered Jan 21 '23 17:01

mmix