Archive Rules: Related Record

vargasthiag
Kilo Contributor

I need to know how to make an Archive Rule that uses AS CONDITION the state of another record. For example: I have emails that have as a target an Incident, i need to set an Archive Rule that when the Incident record is set to ACTIVE = false, after 3 months it archives the email.

1 REPLY 1

Niklas Peterson
Mega Sage

Hi,

I would advise against that. Best practice is to consider emails as subordinate to the Incident. When an Incident is archived, you should archive related records with it; this means the archive rule should run on the incident table, not the email table.


However, if you still wish to proceed, you will need some customizations. One way to solve this is to add a custom field (u_target_inactivation) to the email table. This field acts as a flag and should store the timestamp of when the Incident was set to inactive. You will then need a Business Rule to update this field whenever an Incident is inactivated.

Once that is in place, you can set up an Archive Rule for the email table with the condition: u_target_inactivation is before the last 3 months.


Again, this is a possible way to address your challenge, not a recommendation.

Regards,
Niklas