- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 09:10 PM
Hello,
I have a knowledge notification which should be sent to author of the article whenever the approver rejects it. I have created an event and triggering it in after update business rule.
Created a notification and checked event param 1 and send to event creator checkbox, now the notification is going twice when the article is rejected. Please let me know if I need to make any other changes.
Thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2019 01:18 AM
Hello,
I want to get the rejection comments in the notification which is available on the approval table, if I trigger the event from workflow I wont be able to populate the comments.
Do you have any thought on how this can be populated while triggering it from workflow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 09:56 PM
Yes the business rule is running twice and the event is triggered twice, but I have the condition in after update business rule that it should only trigger when source table is kb_knowledge and if the state changes to rejected.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 10:00 PM
can you share the BR script with condition?
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 10:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 10:43 PM
can you place line number 12 to 14 inside if and try?
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2019 11:07 PM
I have replicated in my personal dev. It works fine for me. Here is the logic I used
COndition same as yours
Script:
(function executeRule(current, previous /*null when async*/) {
var rec= current.document_id;
var kn ='';
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('sys_id',rec);
gr.query();
if(gr.next())
{
//kn = gr.kb_knowledge_base;
}
gs.eventQueue('approval.rejected',current,current.document_id.author);
I used OOB event just for testing
})(current, previous);
Harish