GlideModal | Delete Record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2023 08:55 AM
Hi
As a beginner on this tool, I'm attempting to create a simple prompt to appear when I click the custom delete button. I've set up a basic Glide confirmation, but when I click 'OK', the current record does not get deleted. I'm unsure of what is causing the issue.
UI Action script
function deleteconfirmationdialog() {
var gm = new GlideModal("glide_confirm_basic", true, 400);
gm.setTitle("Ready to delete?");
gm.setPreference("title", "Doing so will permanently delete the record from the database");
//cancel
gm.setPreference("onPromptCancel",
function() {
return;
});
//ok
gm.setPreference("onPromptComplete",
function() {
current.deleteRecord();
});
gm.render();
}
expected result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2023 10:13 AM
Not sure you can do it in such a way... Why dont you check the OOB UI Actio sysverb_delete (display name Delete). There is an AJAX called script include named DeleteRecordAjax().
This is working for sure + as far as i recall it - in the delete UIAction there is delete_confirm_form as OOB modal.