via business rule sent notification to two reference fields

Mabubi
Tera Contributor

I Have a custom table there two fields is there .Those two fields are reference to user table type is reference. IN that In custom table approvals records  is there. so  i written approval notification  from approval table. Then 

notification to send two fields via event based. Can any one let me know please sample script.

 

 

3 REPLIES 3

Samaksh Wani
Giga Sage
Giga Sage

Hello @Mabubi 

 

plz follow the below link for the solution of your query:-

 

https://www.servicenow.com/community/developer-forum/creating-schedule-job-to-send-notification/m-p/...

 

Plz Mark my Solution as Accept and Give me thumbs up, if you find it helpful.

 

Regards,

Samaksh

 

Mabubi
Tera Contributor

am looking for business rule to send notification to those two fields.

Mabubi_0-1693561000937.png

 

Mabubi
Tera Contributor

Business rule written like this. But it is not triggering email to requestor, employee name.

 

(function executeRule(current, previous /*null when async*/) {

// Add your code here
var requestor = current.opened_by;
var employename = current.u_employee_name;
gs.eventQueue('sn_ls_pos.approval_requestor', current, employename,requestor);

})(current, previous);