How to add a custom UI Actions to sc_cat_item

younes chookri
Kilo Contributor

Hello,

I'm fairly new to the ServiceNow platform, I was tasked with creating a custom Delete, and stationary "Edit in Catalog Builder" buttons.

For the Delete Action UI, I've tried the following script but doesn't seem to work:

Action name: sysverb_ws_delete

OnClick: deleteClient() 

Script: current.deleteRecord();

Workspace Client Script:

function deleteClient(){
  if(confirm("Do you want to delete this record?")){
    gsftSubmit(null,g_form.getFormElement(),'deleteRecord');
  }else{
    alert("Record has not been deleted") ;
  }

}

if(typeof window == 'undefined'){
  myServerSideFunction();
}

function myServerSideFunction(){
  current.deleteRecord();
}

 

As for the "Edit in Catalog Builder" button, I went to System UI >> UI Actions and looked for it to make it stationary but It can't be unlocked since it's protected. 

Thank you for your help in advance.

1 REPLY 1

Allen Andreas
Administrator
Administrator

Hello,

It's not very clear why you're needing to custom build these buttons as these already exist, especially the delete button. You'd need to look at your "delete" ACLs for this table and ensure proper permissions are given to correct individuals.

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!