How to add KB contributor in approval/rejection mail, while sending a notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Could someone please assist me in adding the KB Contributor to the approval/rejection email notifications?
Thanks & regards,
Amit Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AmitK1382912422 ,
To Add the KB Contributor as a recipient using an Advanced Recipient Script in the notification.
Steps to follow
- Navigate to System Notification --Email -- Notifications
- Open the Knowledge Approval / Rejection notification
- Go to the Recipients tab
- Enable Advanced
- Add the following script
Advanced Recipient Script
var kb = current.sysapproval.getRefRecord();
if (kb && kb.isValidRecord()) {
answer = kb.kb_contributor; // or kb.author / custom contributor field
}
Notes
- Works for both approval and rejection notifications
- If the notification is based directly on kb_knowledge, you can instead add the contributor field under Users/Groups in fields
- Replace kb_contributor with the correct field if your instance uses author or a custom contributor field
If my response helped mark as helpful and accept the solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @AnkaRaoB ,
Your solution is correct and using an Advanced Recipient Script is the right approach when the notification is triggered from sysapproval_approver.
One important detail that may be missing and is worth clarifying is the notification table context.
If the notification is based on sysapproval_approver, then using:
current.sysapproval.getRefRecord();
is required, because current refers to the approval record, not the KB article.
However, if the notification is instead configured on kb_knowledge, the Advanced Recipient Script is not needed at all. In that case, the KB contributor field, for example author, kb_contributor, or a custom field, can be added directly under Users or Groups in fields in the Recipients section.
Additionally, it is good practice to add a null check to avoid silent failures if the contributor field is empty, for example:
var kb = current.sysapproval.getRefRecord();
if (kb && kb.isValidRecord() && kb.kb_contributor) {
answer = kb.kb_contributor;
}
Clarifying this helps avoid confusion and ensures the solution works correctly depending on how the KB approval notification is implemented.
Hope this helps @AmitK1382912422 .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Actually I have to send notifications to kb contributor & author at a time. But I can’t see any field like contributor. As I can see the author field the notification is going to only author. Please provide the solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi Team,
I need to send notification to both contributor & Author at a time. I cant see the field like Contributor in the form view of KB. Here i am attaching the screen sort. Please provide me the solution.
