Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2021 12:21 PM
Updated Sample code:
//Client-side 'onclick' function
function test(){
var usrResponse = confirm('Are you sure you want to transfer this request to incident?');
if(usrResponse == 'false'){
return false; //Abort submission
}
//Call the UI Action and skip the 'onclick' function
gsftSubmit(null, g_form.getFormElement(), 'test'); //MUST call the 'Action name' set in this UI Action
}
//Code that runs without 'onclick'
//Ensure call to server-side function with no browser errors
if(typeof window == 'undefined')
runBusRuleCode();
//Server-side function
function runBusRuleCode(){
current.transf_inc = true;
current.update();
gs.addInfoMessage('You did it!');
action.setRedirectURL(current);
}