- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 09:07 PM
i have a requirement to trigger a notification using worflow
To all the servicenowner of group BTG,IS,MIS,OCIO,Support, whose active status is live .
I have written the following script , but it is triggering email to only 1 , it should trigger to all the service owners who fulfill the condition
Script :
var answer = [];
var gr = new GlideRecord("cmdb_ci_service");
gr.addEncodedQuery('u_business_unitINBTG,IS,MIS,OCIO,Support^install_status=300');
gr.query();
while (gr.next()) {
answer.push(gr.getValue("owned_by"));
}
//gs.log("Ayurveda" + answer);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 09:17 PM
How are you triggering the notification, can you share the snapshot of your workflow ? Also is your "answer" populating correctly in the log you have added?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 09:17 PM
How are you triggering the notification, can you share the snapshot of your workflow ? Also is your "answer" populating correctly in the log you have added?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 09:21 PM
Please find the screenshot beelow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 10:56 PM
Can you set the answer to a hardcoded array by taking 2 3 sys ids from the log that you are getting just to check if it's being sent to those mentioned users/ groups or not. also don't declare the variable as var answer = [] as it's not needed.