Notification not working in scoped application
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 05:24 AM
HI,
I created a scheduled job in scoped application which based on the expire date email will be sending in advance for alert.
the day calculation i havent shared here, but i am able see the logs but notification is not getting triggered. For
example : i can post the logs which received for 1 day record.
Certificate expires 1 days from today: Facility Management Appl - L2owned by - Christoffer A.
*********************************************************************************************************************
gs.eventQueue('sn_disco_certmgmt.1day','', managedByGroup, ownedBy);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 05:36 AM
hello @AnandKumar1 ,
in event queue there are ultimately four things you need to take care of
event name , glidereocrd object / current object , parm 1 and parm2
what can i see from this line in your code id you are passing event name and parameters correctly but you are not passing the object .
gs.eventQueue('sn_disco_certmgmt.15days', managedByGroup, ownedBy);
Instead of this try below syntax
gs.eventQueue('sn_disco_certmgmt.15days', your object , managedByGroup, ownedBy);
Please make sure that the glide record object your are passing should be of the table that your notification is configured on.Both should be same.
Example if your notification is configured on cmdb_ci_service_discovered. table you need to have the event queue like below
gs.eventQueue('sn_disco_certmgmt.15days', applicationGR , managedByGroup, ownedBy);
Hope this helps
Mark my answer correct if this helps you
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2024 05:53 AM
Hi Mohith,
i am getting an error that glide is not defined.
Can you confirm, since i used empty ' ' as well and resulting same.
*** Script: Certificate expires 1 days from today: Facility Management Appl - L2owned by - Christoffer A.
Evaluator: com.glide.script.RhinoEcmaError: "applicationGR" is not defined. script : Line(80) column(0) 77: if (days == 1) { 78: 79: gs.info("Certificate expires 1 days from today: " + managedByGroup + "owned by - " + ownedBy); ==> 80: gs.eventQueue('sn_disco_certmgmt.1day',applicationGR , managedByGroup, ownedBy); 81: } 82: