Create Prompt while close HR case by asking confirmation .

Prasanna49
Tera Contributor

Currently, we are looking for functionality where an prompt should be open whenever assigned to clicked on "Close Complete" button (UI Action) to take confirmation for HR cases.

 

Regards,

Prasanna

1 REPLY 1

Deepak Shaerma
Kilo Sage

Hi @Prasanna49 
Go to UI Actions--> Modify Close Complete

if (g_form.isNewRecord()) {
    alert("You cannot close a new record without saving it first.");
    return false;
} else {
    var confirmClose = confirm("Are you sure you want to close this case as Complete?");
    if (confirmClose) {
        // If confirmed, proceed with the default action
        gsftSubmit(null, g_form.getFormElement(), 'close_complete'); // Replace ‘close_complete’ with the actual action name if different
    } else {
        // If not confirmed, do nothing (prevent the UI Action from submitting)
        return false;
    }
}

Please Mark this Helpful and Accepted Solution. If this Helps you to understand. This will help both the community and me..
- Keep Learning ‌‌
Thanks & Regards 
Deepak Sharma