- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 04:59 AM - edited 03-05-2024 05:02 AM
Hello,
When Planned Start or End date changes notification should be triggered to Ctask assigned to person. I am trying to achieve this using event trigger and BR on Ctask table, when I give condition planned start or end date changes notification is not getting triggered. Need some inputs.
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 07:52 AM
Hi @Nikithesh R ,
I got it working 😁,i tried in my pdi , please refer below
Create before update BR on change request table,
(function executeRule(current, previous /*null when async*/ ) {
gs.info('inside br');
var demand = new GlideRecord('change_task');
demand.addQuery('change_request', current.sys_id);
demand.query();
if (demand.next()) {
gs.info('inside if');
gs.eventQueue('test.notify', demand, '', '');
}
})(current, previous);
Event:
Notification:
When event is triggered,
Result:
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 06:58 AM
Hi @Nikithesh R ,
In eventqueue instead of current.getValue('assigned_to') use below code:
current.assigned_to.toString()
add gs.info() (or) gs.log() functions to print the values
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 07:01 AM
Hello @Sumanth16,
The conditions are not working, event itself is not getting triggered.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 07:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 07:52 AM
Hi @Nikithesh R ,
I got it working 😁,i tried in my pdi , please refer below
Create before update BR on change request table,
(function executeRule(current, previous /*null when async*/ ) {
gs.info('inside br');
var demand = new GlideRecord('change_task');
demand.addQuery('change_request', current.sys_id);
demand.query();
if (demand.next()) {
gs.info('inside if');
gs.eventQueue('test.notify', demand, '', '');
}
})(current, previous);
Event:
Notification:
When event is triggered,
Result:
Please mark this comment as Correct Answer/Helpful if it helped you.
Regards,
Swathi Sarang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2024 08:08 AM