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
kishore babu 20kishore babu 20 

case owner delete the case otherwise showing error? how to write trigger?

Best Answer chosen by kishore babu 20
Here is the trigger:
trigger caseDelete on Case(before delete) {

  for(Case cse : trigger.old) {
     if(cse.OwnerId != userInfo.getUserID()) {
	  cse.addError('Only Owner Can Delete This Case');

Mark solved if it does help you