- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 08:45 PM
Hi All,
I have a requirement to hide a button called "integration" on incident form for the below mentioned conditions.
1. Assignment group should "WINTEL TEAM".
2. Business service should be "in contact type".
3. There is a related list on the incident form where integration tickets records available. I need to filter the incident ticket if it is already integrated. If it is integrated already, then button should not be visible. If it is not integrated then, "integration" button should be visible on the incident form.
I have been trying to achieve it via business rule. But can you help me how to enable or disable the button after filtering the related lilist records. Is there any function available to achieve it. Please help
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 08:59 PM
Hi,
You need to use condition field on UI action to manage visibility.
For related list condition your need to query the related list table and return true/false.
Your condition would be like below:
current.assignmemt_group == 'sys_id of WINTEL' && current.u_business_service == 'sys_id of Service' && new scriptIncludeName().functionName(current)
your script include function would look like below:
functionName: function(current){
var integrationGr = new Gliderecord('integration_table_name');
integrationGr.addQuery('field_name_having_incident_reference',current.sys_id);
integrationGr.query();
return !integrationGr.hasNext();
}
Replace custom field and table names in above script as per your configuration
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2024 08:24 PM
Hi @Sravanthi Dhara, You need to correct line 5 in your script include from Gliderecord to GlideRecord
Regards,
Sunil

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2023 08:59 PM
Hi,
You need to use condition field on UI action to manage visibility.
For related list condition your need to query the related list table and return true/false.
Your condition would be like below:
current.assignmemt_group == 'sys_id of WINTEL' && current.u_business_service == 'sys_id of Service' && new scriptIncludeName().functionName(current)
your script include function would look like below:
functionName: function(current){
var integrationGr = new Gliderecord('integration_table_name');
integrationGr.addQuery('field_name_having_incident_reference',current.sys_id);
integrationGr.query();
return !integrationGr.hasNext();
}
Replace custom field and table names in above script as per your configuration
Thanks
Anil Lande
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2024 08:15 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2024 08:24 PM
Hi @Sravanthi Dhara, You need to correct line 5 in your script include from Gliderecord to GlideRecord
Regards,
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2024 08:29 PM
Hi Anil,
I have rectified the issue. In my glide record method, "r" was small case(Gliderecord). Hence that is the reason it was not working properly. Now it is working as expected. Thanks for the help. Very much appreciated😊.