Need to send notification when worknotes or comments in updated in sc_task table

suuriya
Tera Contributor

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

6 REPLIES 6

SN_Learn
Kilo Patron
Kilo Patron

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:

SN_Learn_1-1716652085451.png

 

 

Please mark the answer as correct/helpful based on impact.

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

Community Alums
Not applicable

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 

SarthakKashyap_0-1716662168679.png

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 

SarthakKashyap_1-1716662289511.png

 

Now create notification and add below configuration 

SarthakKashyap_2-1716662348111.png

Add subject and body as per your requirments 

 

Result 

You can check email in emails<log table 

SarthakKashyap_3-1716662403826.png

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards 

Sarthak

 

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

Community Alums
Not applicable

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 

SarthakKashyap_0-1716832202311.png

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards 

Sarthak