Change the delete dialog message

Fredjo
Giga Contributor

Hi Community, 

How do I change the "Delete this record?" message that displays when deleting a record. I need to change it for a table that resides outside the global application. 

Any help would be much appreciated. 

1 ACCEPTED SOLUTION

Chris M3
Tera Guru

Best bet is probably to create a custom delete UI Action.  Take a look at the code in the OOB Global Delete UI Actions, or any of the other Delete UI Actions, and make one for your table.  Make sure the Action Name for your Delete is 'sysverb_delete' so that it overrides the GLOBAL one for your custom table.

View solution in original post

4 REPLIES 4

Chris M3
Tera Guru

Best bet is probably to create a custom delete UI Action.  Take a look at the code in the OOB Global Delete UI Actions, or any of the other Delete UI Actions, and make one for your table.  Make sure the Action Name for your Delete is 'sysverb_delete' so that it overrides the GLOBAL one for your custom table.

Johnnie O_
Kilo Guru

The page itself is a UI page named delete_confirm_form. You can look at copying that and customizing it for your scoped app, customizing the delete UI action in your scoped app to call your new UI page.

Nitesh Balusu
Giga Guru

Only way I see is like Chris mentioned, building another UI Action for deleting the record, and then building another UI page (glide dialog window) and changing it to whatever you want it to be.

 

I'll expand by saying there should be no reason to create a custom UI Page.  You'll see in the OOB UI Action examples of overriding the message, by sending additional parameters.  I would not suggest updating the OOB UI Action to just change the message, especially with a scoped app, so still do the custom UI action, but no need for your own UI Page.  Below are a couple lines in there that show this option.

 

dlg.setPreference('sysparm_msg_override', 'Delete this channel?');
dlg.setPreference('sysparm_cascade_msg_override', 'Deleting this channel will result in the automatic deletion of the following related records:');