+ Start a Discussion
Ashley ZhaoAshley Zhao 

salesforce when delete a record how to trigger a process

hi,all.
i am new here .
i want to combine process bulider and flow to complete that when i delete a record  ,the process will be trigger..can everybody help me?
for example , the Account object,i want to delete an account's case, when i delete it,it will trigger an outbound msg...
thx....
Best Answer chosen by Ashley Zhao
Shashi PatowaryShashi Patowary
Hi Ashley,

Workflow does not execute when a record is deleted. Hence you cannot send an outbound message from workflow directly on case record deletion from account.
However, you can do a workaround -
1.Create a checkbox field in account e.g Delete_Flag__c
2.Create a trigger on Case object with 'before delete' event and update the related Delete_Flag__c in account rceord when a case is deleted
3.Create a workflow in Account object that has filter on Delete_Flag__c field and create your required outbound message


Please let me know if it works.

Regards,
Shashi

All Answers

Shashi PatowaryShashi Patowary
Hi Ashley,

Workflow does not execute when a record is deleted. Hence you cannot send an outbound message from workflow directly on case record deletion from account.
However, you can do a workaround -
1.Create a checkbox field in account e.g Delete_Flag__c
2.Create a trigger on Case object with 'before delete' event and update the related Delete_Flag__c in account rceord when a case is deleted
3.Create a workflow in Account object that has filter on Delete_Flag__c field and create your required outbound message


Please let me know if it works.

Regards,
Shashi
This was selected as the best answer
Neetu_BansalNeetu_Bansal
Hi Ashley,

Workflow Rules or Processes not execute when a record is deleted. So you can create a trigger for the same. Whenever any record deleted, send the outbound message from the trigger itself.

Let me know, if you need help in writing the trigger.

Thanks,
Neetu