- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2020 03:24 PM
Hello,
I have a UI action button and when it is clicked it asks the user for confirmation about closing a record (see pics below).
For some reason when I click 'Ok' on the confirmation, nothing happens. Is my code off?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 03:16 PM
I modified the code slightly and this worked:
function closeRecord() {
var answer = confirm("Are you sure you want to close this candidate record?");
if (answer == true) {
gsftSubmit(null, g_form.getFormElement(), "ACTION_NAME");
}
if (answer == false) {
return false;
}
}
if (typeof window == 'undefined') {
UpdateStatus();
}
function UpdateStatus() {
current.status = "closed_no_interest";
current.update();
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 09:00 AM
Try the same thing on the incident table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 03:16 PM
I modified the code slightly and this worked:
function closeRecord() {
var answer = confirm("Are you sure you want to close this candidate record?");
if (answer == true) {
gsftSubmit(null, g_form.getFormElement(), "ACTION_NAME");
}
if (answer == false) {
return false;
}
}
if (typeof window == 'undefined') {
UpdateStatus();
}
function UpdateStatus() {
current.status = "closed_no_interest";
current.update();
action.setRedirectURL(current);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-13-2020 08:00 AM
in the onClick i have a semicolon after closeRecord();