I need a script of unauthorized record deletion in business rule

deepakbisht
Kilo Contributor
 
1 ACCEPTED SOLUTION

Dushyant Siroh
Tera Expert

Hi @deepakbisht 

 

Please Use Before Delete 

 

use this script :-

 

if (!gs.hasRole('admin')) {
   gs.addErrorMessage('You are not authorized to delete this CI.');
   current.setAbortAction(true);
}

 Kind Regards,

Dushyant Sirohi

View solution in original post

1 REPLY 1

Dushyant Siroh
Tera Expert

Hi @deepakbisht 

 

Please Use Before Delete 

 

use this script :-

 

if (!gs.hasRole('admin')) {
   gs.addErrorMessage('You are not authorized to delete this CI.');
   current.setAbortAction(true);
}

 Kind Regards,

Dushyant Sirohi