CRM

nikan
Participant | Elite Partner
Participant | Elite Partner

Trigger workflow on record deletion

SOLVE

I am working on a project where products are created and updated according to a custom object record and its properties. If the custom object is updated, the product gets updated. 

Is there a way to trigger a workflow when the custom object is deleted? I wasn't sure if I could use Object Id and "is unknown" as a trigger for "deletion" or if there is another way. I haven't found any documentation on this yet. 

1 Accepted solution
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Trigger workflow on record deletion

SOLVE

Hi @nikan,

 

This is currently not supported in workflows, unfortunately. Workflows enroll records one by one and then execute the workflow actions – if a record has been deleted before, it can't enroll in the workflow anymore.

 

Could you provide more context as to why the object records needs to be deleted? There are probably ways of putting the custom object records out of sight and trigger your workflows in a different way.

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

View solution in original post

6 Replies 6
cixondev
Participant | Diamond Partner
Participant | Diamond Partner

Trigger workflow on record deletion

SOLVE

As a possible workaround, maybe you can create a list with all custom objects and record id is known. As a trigger you can than select removed from list. This would trigger the workflow if the custom object is deleted I think.

0 Upvotes
Rafs
Member

Trigger workflow on record deletion

SOLVE

I have tried the above, it did not work.

0 Upvotes
cjkappen
Participant | Diamond Partner
Participant | Diamond Partner

Trigger workflow on record deletion

SOLVE

This would be a really nice addition to prevent orphaned object records from hanging out after a parent record is deleted. 

0 Upvotes
karstenkoehler
Solution
Hall of Famer | Partner
Hall of Famer | Partner

Trigger workflow on record deletion

SOLVE

Hi @nikan,

 

This is currently not supported in workflows, unfortunately. Workflows enroll records one by one and then execute the workflow actions – if a record has been deleted before, it can't enroll in the workflow anymore.

 

Could you provide more context as to why the object records needs to be deleted? There are probably ways of putting the custom object records out of sight and trigger your workflows in a different way.

 

Best regards!

Karsten Köhler
HubSpot Freelancer | RevOps & CRM Consultant | Community Hall of Famer

Beratungstermin mit Karsten vereinbaren

 

Did my post help answer your query? Help the community by marking it as a solution.

Rafs
Member

Trigger workflow on record deletion

SOLVE

Hi Karsten,

 

Thank you for your reply.

I can not give you the answer to your question - why the object needs to be deleted. I guess an end user could answer that question. There is the "Delete" button in the UI, sooner or later it will be clicked, for variety of reasons. I am just a dev not an end user, I need to replicate user's actions in another application, be it insert, update or delete.

Positive regards!

Raf

0 Upvotes
Rafs
Member

Trigger workflow on record deletion

SOLVE

Hi Karsten,

 

For custom objects it is a conundrum.

The API does not support custom objects while it supports deletion events for standard objects.

Workflows support custom objects, but do not support deletion events.

No idea what to do 😞

0 Upvotes