- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 04:03 AM
If a business unit is selected only the departments related to that business unit should be visible in the department reference field, both business unit and department fields are reference type fields, I have written a script include for the advanced reference qualifier, but it is not working
Script Include
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Reference Qualifier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
javascript:new PopulateDepartment().getDepartment(current.u_sbu_ssu) + '^u_active!=false';
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 04:12 AM - edited ‎02-14-2025 04:15 AM
Change your return line to
return 'sys_idIN' + departmentList.join(',');
and you don't really need the concatenated part on the Reference Qualifier, since your GlideRecord includes that.
You could also do this without a Script Include by using a Reference Qualifier that looks more like this:
javascript: 'u_active!=false^business_unit=' + current.u_sbu_ssu;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2025 01:51 PM
Hello @Rahil Mirza
You can simply use : javascript: 'business_unitIN' + current.u_sbu_ssu + '^u_active=true'; instead of using script include
If this addresses your question, please mark this response as Accepted Solution and/or give it a Kudos if you find it helpful.
Thank you!