- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 11:09 AM
Hi all ,
I used 2 client scripts for make ready only based on selection
I want the assignment group to be blanked out, forcing the person to click on Find Assignment Group again if any of these are changed on an Incident Ticket:
CI
Business Service/Category/Sub Category
Classification
When 1 of the above combination are selected, the other fields should become grayed out and the assignment group should be blanked out so that it has to be found again by clicking on the Find Assignment Group button. When I am trying to submit the incident assignment group is blanked out.How can i stop this ...
Please help me
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2017 03:36 AM
Hi Anand,
1. Inactivate the client script which is assigning the assignment group based on CI slection.
2. comment all the clearValue of assignment group from the above specified scripts.
3.Create a on change client script like below & try for the result.
var cid = g_form.getValue('cmdb_ci');
if (cid == ' '){
g_form.setValue('assignment_group', ' ');
}
Hope this will help.
Thank You!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 11:49 AM
Hello Anand,
Do you have any onSubmit Client Scripts active for Incident?
Cheers,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 12:03 PM
yes I have following 2 on submit client script
function onSubmit() {
var action = g_form.getActionName();
if (action != 'close_incident' && action != 'resolve_incident')
return;
// Close notes and Close code must be on the form
if (!g_form.getControl('close_notes') || !g_form.getControl('close_code'))
return;
var state = '6';
if (action == 'close_incident')
state = '7';
g_form.setValue('incident_state', state);
g_form.setValue('state', state);
g_form.setDisplay('close_notes', true);
g_form.setMandatory('close_notes', true);
g_form.setDisplay('close_code', true);
g_form.setMandatory('close_code', true);
if (g_form.getValue('close_notes') == '' || g_form.getValue('close_code') == '')
return false;
}
--------------------------------------------------------------------------------------
function onSubmit() {
if (typeof window == 'undefined')
dowServerReopen();
function dowServerReopen() {
// Set Incident state to active, update and reload the record
g_form.setValue('incident_state', '2');
g_form.addErrorMessage("Reopen Incident");
action.setRedirectURL(current);
g_form.clearValue('assigned_to');
return false;
} }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2017 01:52 PM
while i save the incident assignment going to blanked out based on my onchange client script .How can i stop this or over come this .Please someone help me

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-21-2017 03:36 AM
Hi Anand,
1. Inactivate the client script which is assigning the assignment group based on CI slection.
2. comment all the clearValue of assignment group from the above specified scripts.
3.Create a on change client script like below & try for the result.
var cid = g_form.getValue('cmdb_ci');
if (cid == ' '){
g_form.setValue('assignment_group', ' ');
}
Hope this will help.
Thank You!