Delete a custom record created after "Insert and stay" of read only record

Chenab Khanna
Tera Expert

Hi

I created a copy of an OOTB business rule - Create controls running on Risk Identification [sn_risk_advanced_risk_identification] table.

This BR was "Read only based on its protection policy", however i was able to create a copy of the same but now i am unable to update the new BR since the new BR also got created as "Read only based on its protection policy" 

find_real_file.png

Can anyone help me with deleting this record?

I tried to do it from Fix script, background script but no luck. I also tried to change the xml of the record to set it Active as false and tried importing but everytime it is giving same error - 

Background message, type:access, message: This item is read-only based on its protection policy.
5 REPLIES 5

Community Alums
Not applicable

Hi @Chenab Khanna ,

Check Write & Delete ACLs on  sn_risk_advanced_risk_identification table which is stopping you to delete.

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

I have admin and security_admin rights both. I can delete other records but this record is "Read only based on its protection policy"

Community Alums
Not applicable

Hi,

Please do write the fix script with below mentioned script and run the same, it should work 🙂

var gr = new GlideRecord('sys_script_include');
if (gr.get('add sys id of script include')) {
    gr.sys_policy = ''; //remove protection
    gr.update();
gr.deleteRecord(); --> add this line if you want to delete the record else you can set the value as empty

No luck. I get this message - 

Background message, type:access, message: The Protection policy field cannot be changed for application GRC: Advanced Risk

Tried in both Global and GRC: Advanced Risk scope