Need to send notification when worknotes or comments in updated in sc_task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 08:02 AM
HI Community,
I have a requirement, need to send the notification to the user mentioned in the variable in sc_task table.
When a request is raised, and it generated the task in the task there will be variable named Email notify (list collector field) users mention din that field need to receive the notifications whenever the work Notes or comments is updated in the task.
How we can achieve this as im new to notifications part please explain
Thanks in Advance
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 08:46 AM - edited 05-25-2024 08:49 AM
Hi @suuriya ,
Please follow the article, it might resolve your query.
Send Notification to Glide List Users
In the business rule you can add the below condition, so that it only triggers when either of field is updated:
Please mark the answer as correct/helpful based on impact.
Mark this as Helpful / Accept the Solution if this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2024 11:40 AM
Hi @suuriya ,
I tried your problem in my PDI and it works for me please check below images for reference
Create before Business rule and add belo filter condition
Also add below code
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
gs.eventQueue('work_notes.updated', current, current.getValue("number"), gs.getUser().getEmail());
})(current, previous);
Create event by navigating - All < Events< Registry
Create new event fill the form
Now create notification and add below configuration
Add subject and body as per your requirments
Result
You can check email in emails<log table
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 07:32 AM
HI @Community Alums ,
Thanks for the reply,
I tried the same and in gsevent queue script instead of number i added my list collector field and checked but it is not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2024 10:50 AM
Hi @suuriya ,
I tried to add list collector field it is working fine for me. May be you can send me your code or you can check my below code
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
gs.log("Skillsss = " + current.skills.getDisplayValue())
gs.eventQueue('work_notes.updated', current, current.skills.getDisplayValue(), gs.getUser().getEmail());
})(current, previous);
When I checked my logs it appears like
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak