- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-22-2014 08:31 PM
Hi SN folks,
What can I use to configure a confirm pop up - when clicking cancel button on the change form. If user press cancel - It will ask confirmation, if press OK - cancel change- if cancel It must return to change form without cancelling the record.
Thanks for your help.
Solved! Go to Solution.
- Labels:
-
Service Mapping
- 56,667 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 08:50 PM
attachment seems not be working for me ....
this is the code ...
Note : check the 'client' checkbox and in 'onlick' field , paste this cancelTicket();
function cancelTicket(){
var answer=confirm("Are you sure you want to cancel this record?");
if (answer==true)
{
gsftSubmit(null, g_form.getFormElement(), 'cancel_change'); //MUST call the 'Action name' set in this UI Action
}
else
{
return false;
}
}
if(typeof window == 'undefined')
{
current.state = 8;
current.update();
action.setRedirectURL(current);
gs.addInfoMessage('The current change request has been cancelled.');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 08:44 PM
Let me re-read it where attached?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 08:50 PM
attachment seems not be working for me ....
this is the code ...
Note : check the 'client' checkbox and in 'onlick' field , paste this cancelTicket();
function cancelTicket(){
var answer=confirm("Are you sure you want to cancel this record?");
if (answer==true)
{
gsftSubmit(null, g_form.getFormElement(), 'cancel_change'); //MUST call the 'Action name' set in this UI Action
}
else
{
return false;
}
}
if(typeof window == 'undefined')
{
current.state = 8;
current.update();
action.setRedirectURL(current);
gs.addInfoMessage('The current change request has been cancelled.');
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 09:10 PM
I did exactly like this- however It returns me to the list- when I look for the change record. It is not cancelled. It is still in the same state that It was.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 09:12 PM
are you getting the info message?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2014 09:17 PM
you know what. It works now. But for some reason. The state is changing to closed complete instead of "cancelled". I searched on the value for the "cancelled" state and It is 8.
What can be causing this issue?
if(typeof window == 'undefined')
{
current.state = 8;
current.update();
action.setRedirectURL(current);
gs.addInfoMessage('The current change request has been cancelled.');
}