Client Script to Hide Tabs in incident

edhefford
Kilo Expert

Hi All,

I have a requirement to create a Client Script to hide 2 tabs within the incident view when a certain assignment group is selected.

The client script should run onLoad and achieve the following outcome:

When assignment group VC Office is selected, the Related Records & Resolution Information tabs should be hidden.

find_real_file.png

Is anybody able to help me achieve this? Im hoping and imagining its pretty simple.

Thanks in advance

Ed

1 ACCEPTED SOLUTION

HarshTimes
Tera Guru

You can write below script

if(g_form.getValue('assignment_group')== 'SYS_ID_OF_assignemnt group')

g_form.setSectionDisplay('related_records',false);

g_form.setSectionDisplay('resolution_information',false);

View solution in original post

4 REPLIES 4

Michael Fry1
Kilo Patron

Take a look at the out of box client script - PIR visibility - on the incident communication plans table. It shows/hide related lists based conditions.

HarshTimes
Tera Guru

You can write below script

if(g_form.getValue('assignment_group')== 'SYS_ID_OF_assignemnt group')

g_form.setSectionDisplay('related_records',false);

g_form.setSectionDisplay('resolution_information',false);

Hi @Harshtimes, that's done it! Thank you

Great!Please mark it answered .

 

-harsh