- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-30-2016 10:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 02:56 AM
Okay perfect,
Here is a screenshot that shows the parameters of the UI action, Please do the same
Do not forget to put the action name, check client to true, and put the function name on Onclick()
HEre is the script :
function reopenIncidentTest(){
if (g_form.getValue('comments') == '') {
//Remove any existing field message, set comments mandatory, and show a new field message
try {
g_form.hideFieldMsg('comments');
} catch(e) {}
g_form.setMandatory('comments', true);
g_form.showFieldMsg('comments','Reason is required when reopening an incident','error');
return false; //Abort submission
}
//Call the UI Action and skip the 'onclick' function
gsftSubmit(null, g_form.getFormElement(), 'incident_reopen_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')
serverReject();
function serverReject(){
current.state = 2;
current.update();
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 05:08 AM
In my instance, it does not redirect me to a new incident :
Here is an active incident, I resolve it :
once resolved, i reopened it :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 05:44 AM
yes i have admin role..
i have sent you my full code and screenshot where i am doing wrong in that now ..can you please tell me in that ..
i am using my personal instance ...Helsinki Version ,....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 05:53 AM
if you comment out the action.setRedirect(), does it still open a new incident?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 05:54 AM
Heyyyy thanks you so much Zic....:)
Its working now ....
mistake was in calling that function ..
i was passing wrong name ....
i didnt know it will give error on case sensitive.
thanks you so much once again ..!!!1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-31-2016 06:04 AM
Haha well done, you are welcome