Unable to delete a custom M2M table in GRC Risk Management scoped application

Kirthika D
Giga Guru

There is a custom M2M table created by mistake in GRC: Risk Management scope. The M2M definition record in "sys_m2m" table has been deleted, but the table definition in "sys_db_object" table still exists, along with the field definitions and label configurations. I wanted to delete this table and capture the deletion in an update set, so that it can be moved to other instances as well. However, the delete UI action is not visible in the table definition record. I have seen other community page solutions pointing to deactivate an ACL but I wanted to check if it is possible to do this without making changes to an OOTB ACL, possibly via a fix script. 

 

Please suggest if this is achievable. 

 

Thanks. 

 

Edit: Reason why I posed the question is that it is not possible to delete the table as it was created with a name prefix "sn_risk" and not with the prefix "u_", making it impossible to delete the table manually. Hence required solution to delete it via script. 

2 ACCEPTED SOLUTIONS

Siddhesh Gawade
Mega Sage
Mega Sage

Hello @Kirthika D ,

 

You can below below snippet in background script.

var tableDeletion = new TableUtils();
tableDeletion.dropAndClean('Table_nam_here');

 

Kindly mark the answer ✔️ Correct or Helpful ✔️ If it addresses your concern.


Regards,

Siddhesh

 

View solution in original post

Never mind, I just found that checking the "unloadable" checkbox in the fix script creates customer updates for the changes done by executing the script. This helps. 

 

Thank you,

Kirthika D 

 

 

Edit: TableUtils is not accessible from outside Global scope, but it can be called from Global scope to delete tables in other scopes. 

View solution in original post

11 REPLIES 11

Never mind, I just found that checking the "unloadable" checkbox in the fix script creates customer updates for the changes done by executing the script. This helps. 

 

Thank you,

Kirthika D 

 

 

Edit: TableUtils is not accessible from outside Global scope, but it can be called from Global scope to delete tables in other scopes. 

Exactly backgroud script doesn't capture updates, So using the fix script would be best practice.

TableUtils script include is not callable from Risk Management scope. ☹️

@Siddhesh Gawade , is there a workaround for this?

Can you try 

var tableDeletion = new global.TableUtils();

tableDeletion.dropAndClean('Table_nam_here')

Tried that, but in vain. I had to recreate the fix script in global scope and call the function from global scope. It did delete the table, but I had to manually move the customer update records to a scoped update set before migrating it to other instances. 
Thanks for your help. 🙂