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
wongtwongt 

Prevent deletion of Activity Histories

I have a requirement to prevent users from deleting Activity Histories for one standard object only.

 

I've looked and there isn't an option to hide visibility of the "delete" link or set permissions to prevent users from deleting the Activity History.

 

I've also explored the possibility of writing a trigger, but it seems like there isn't an option of creating a trigger on the ActivityHistory object.

 

Any ideas or suggestions?

Best Answer chosen by Admin (Salesforce Developers) 
wongtwongt

Never mind.

 

I created a trigger on the Task object, and that worked.

All Answers

wongtwongt

Never mind.

 

I created a trigger on the Task object, and that worked.

This was selected as the best answer
JIDzenpriseJIDzenprise

Can you share your trigger?

SK R.ax1448SK R.ax1448

Can you please share your trigger  ? or send to rskthehero@gmail.com.

 

Thanks in advance !