
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 01:59 AM
Hello
I have a business rule to filter the possible contacts to add in the manual external comment lists.
I have the following script that currently returns only the users from the case's company
function getFilterExternalComment(){
var companysysid = current.company;
var parentcompanysysid = current.company.parent;
if (getugroupuser()=="OCD-EU" || getugroupuser()=="OCD-UK" || getugroupuser()=="OCD-INTL")
return "company=" + companysysid;
//+ "^ORcompany=5c9bdd3101f3b800fa5ff1cd4a39695f" + "^ORcompany=fc0557905ca4d1008250bb9066814b6f" + "^ORcompany=" + parentcompanysysid;
// éventuellement on peut rajouter la company AIS => "^ORcompany=5c9bdd3101f3b800fa5ff1cd4a39695f";
else
return "";
}
I would like to also return two specific companies with their sys ids and the parent company of the ticket company.
However , the OR condition seems not working. I tried as you can see in my lines commented.
Can someone give me a hand to find my way out ?
Thanks
Jérôme
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 02:40 AM
Try once with below statements.
return "companyIN" + companysysid + "," + "5c9bdd3101f3b800fa5ff1cd4a39695f" + "," + "fc0557905ca4d1008250bb9066814b6f" + "," + parentcompanysysid;
or
return "company.sys_idIN" + companysysid + "," + "5c9bdd3101f3b800fa5ff1cd4a39695f" + "," + "fc0557905ca4d1008250bb9066814b6f" + "," + parentcompanysysid;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 02:30 AM
I suggest to use an array for multiple values. Try the link below:
https://snprotips.com/blog/2016/2/6/gliderecord-client-side-vs-server-side
Mark Helpful if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2022 02:40 AM
Try once with below statements.
return "companyIN" + companysysid + "," + "5c9bdd3101f3b800fa5ff1cd4a39695f" + "," + "fc0557905ca4d1008250bb9066814b6f" + "," + parentcompanysysid;
or
return "company.sys_idIN" + companysysid + "," + "5c9bdd3101f3b800fa5ff1cd4a39695f" + "," + "fc0557905ca4d1008250bb9066814b6f" + "," + parentcompanysysid;