Close Code and Close notes mandatory for Change Request in 'Canceled' state
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2016 03:56 AM
As 'Cancel Change' is a UI Actions and it is not Client so we cannot use g_form.setMandatory function in UI Action. I tried to do it using Script include with 'Client Callable' but still I guess I can't use Glide Form functions in Script Include. I Tried with UI Policies also but not working. Can anyone suggest me solution for this??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2016 03:25 AM
Hi,
Yes I was also having same Issues.
Add 2 more lines in the script.
1. To set value of state to 'Cancelled' using g_form.setValue function in the first line of function.
2. Add g_form.save() else it will not save your records if u click 'cancel change' again instead it will reload the form. Add this function after setting all the values and making it mandatory or read only. Before 'return false;' statement.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-17-2016 12:12 AM
Hi ,,
I am using same code but its not working..
Could you help me
Code..
function cancelChange(){
var wn = g_form.getValue('work_notes');
if (wn == ''){
g_tabs2Sections.setActive(3);
g_form.flash('work_notes','red',1);
g_form.clearMessages('work_notes');
g_form.showFieldMsg('work_notes','Work Notes are Mandatory when Cancelling a Change','error');
g_form.setMandatory('work_notes', true);
return false;
}
gsftSubmit(null, g_form.getFormElement(), 'cancel_change'); //MUST call the 'Action name' set in this UI Action
}
//Ensure call to server-side function with no browser errors
if (typeof window == 'undefined')
moveToCancel();
function moveToCancel(){
action.setRedirectURL(current);
if (new ChangeRequestStateHandler(current).moveTo("canceled"))
current.update();
}
Function : cancelChange()
Note : Which table to select task or change request
Thanks
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-23-2016 04:30 AM
Hi Roopa,
What is Your requirement Exactly? And what error or issue are you getting??

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2016 10:15 PM
Hi Anubhav,
I got it resolved ...
I was trying for new UI action,
I added some of lines in the Cancel Change UI action which is OOB..Then its working fine.
Thanks,
Roopa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2016 11:13 PM
Hi Roopa,
That is Good.