- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 09:17 AM
Hi all,
here again....
I have a requirement to set a flag (true) on an incident record (however the field is hidden from the form). This sounds simple..although I need to set this flag BEFORE all mandatory fields on the incident form are completed.
Currently I have done this in a ui action however obviously it tells me mandatory fields have not been completed first.
background info:
I have a script include in the ref qualifier of a business service field (amended ci field) which does some funky stuff like only show business services from the same location of the caller entered. However I need to put in an 'override' ability to allow that business service filter to return all. Hence I was thinking If a UI action could set a flag to true..I could add an OR field value = true to the script include to then bring back all.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 12:15 PM
Pardeep,
Thanks for pointing in the right direction.
In the interest of sharing.
The solution was:
UI Action:
//onclick function
function overrideBS() {
g_form.checkMandatory = false;
gsftSubmit(null, g_form.getFormElement(), 'overridebs');
}
//as I removed the field off the form then the following also
current.u_override_business_services = 'true';
action.setRedirectURL(current);
current.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 09:41 AM
How do you hide the field? If you do it with a UI Policy, you should be able to change the value of the field with g_form.setValue() without having to unhide it.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 09:46 AM
Hi Russell,
You may find the below thread helpful.
Saving a record without populating all mandatory variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-10-2015 12:15 PM
Pardeep,
Thanks for pointing in the right direction.
In the interest of sharing.
The solution was:
UI Action:
//onclick function
function overrideBS() {
g_form.checkMandatory = false;
gsftSubmit(null, g_form.getFormElement(), 'overridebs');
}
//as I removed the field off the form then the following also
current.u_override_business_services = 'true';
action.setRedirectURL(current);
current.update();