How to stop client script after submiting the incident

ronaldanand
Tera Contributor

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 ...

1.jpg

2.jpg

Please help me

1 ACCEPTED SOLUTION

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!


View solution in original post

7 REPLIES 7

Thanks Banu...



Its working good...


Dave Smith1
ServiceNow Employee
ServiceNow Employee

anand kumar wrote:



Hi all ,



I used 2 client scripts for make ready only based on selection



Why not use a UI Policy here?


Hi Dave,


Thanks for the replay ,But some of the time UI policy not working properly.