function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thintonthinton 

Activity history "Related To" field question

Hi,
 
I have made a custom object, and I am now writing a script that auto-populates activity records. These activity records are set to be Related To my custom object using the "WhatId" field.
 
I also have capabilities in a custom tab to manipulate this custom object, including the capabilities to delete them. Here is my problem.
 
When you delete an instance of this object that is referenced from an activity record for a contact, that activity record is deleted entirely. I need the activity records to be able to persist, even if the instance of the custom object is deleted, for history purposes. Is this possible?
 
Thanks
adamgadamg
I don't think its possible to change the cascading delete behavior for standard objects; of course for custom objects its up to you based on the type of relationship you create..