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
Jamz_2010Jamz_2010 

Prevent Deletion of Notes

Hi all,

 

Does anyone know how I can prevent users from being able to delete notes? The users still need to be able to create Notes but for traceability we need to prevent users deleting notes...

 

Any help would be great,

 

Cheers

 

James

Best Answer chosen by Admin (Salesforce Developers) 
Jamz_2010Jamz_2010

Hi,

 

I just had a look and it is possible to add Triggers to notes and attachments - you have to do this via the Ecplise IDE. From this I have been able to create a Trigger which occurs "Before Delete" and adds an error to every Note that comes in. This prevents users from being able to delete items.

 

Cheers

 

James 

All Answers

Ispita_NavatarIspita_Navatar

One cannot put a trigger, validation rule on Notes, neither the related list of Notes is customizable that one can remove the "Delete" link, so the only way of preventing deletion would be to:-

1. Remove the Notes and Attachment related list

2. Provide a widget for notes which allow addition and listing of Notes.

 

Did this answer your question? If not, let me know what didn't work, or if so, please mark it solved.

Jamz_2010Jamz_2010

Hi,

 

I just had a look and it is possible to add Triggers to notes and attachments - you have to do this via the Ecplise IDE. From this I have been able to create a Trigger which occurs "Before Delete" and adds an error to every Note that comes in. This prevents users from being able to delete items.

 

Cheers

 

James 

This was selected as the best answer