- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2023 08:38 AM
Hi all - little background is that we've enabled Knowledge Feedback Tasks if a user flags a KA, or marks it as unhelpful or gives it a rating of less than 3 stars. Works perfectly well but we also want to generate a task when someone leaves a comment on the article itself. So - I've created its own business rule on insert which works well up until a point.
So as below when I leave a comment it generates the below knowledge feedback record OOTB. What I want to do with this is then generate a Knowledge Feedback Task.
The below script creates the task perfectly fine however I'm having a bit of trouble sending over the data from the Article field.
(function executeRule(current, previous /*null when async*/) {
var kft = new GlideRecord('kb_feedback_task');
kft.initialize();
kft.opened_by = current.user;
kft.article = current.article.getDisplayValue();
kft.feedback_task_type = '5';
kft.description = current.comments;
kft.insert();
})(current, previous);
When I look at the task its created everything else has worked fine apart from the Article.
Am I using the correct script line? I'm wondering if perhaps it may be because the field is read-only, but submitted by and feedback task type do not have the same problem.
Thanks in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2023 09:44 AM - edited ‎07-19-2023 09:58 AM
@LRhodes Kindly try modifying the below line in your BR
kft.article = current.article.getDisplayValue();
Please change this line to
kft.feedback= current.sys_id;
Knowledge Feedback Task table does not have a field called Article, instead it has a reference to the feedback that is submitted and the article number is shown from the feedback that is associated.
Please mark the appropriate response as correct answer and helpful.
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2023 09:44 AM - edited ‎07-19-2023 09:58 AM
@LRhodes Kindly try modifying the below line in your BR
kft.article = current.article.getDisplayValue();
Please change this line to
kft.feedback= current.sys_id;
Knowledge Feedback Task table does not have a field called Article, instead it has a reference to the feedback that is submitted and the article number is shown from the feedback that is associated.
Please mark the appropriate response as correct answer and helpful.
Thanks!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2023 02:54 AM
Thank you Arun - for the resolution and the explanation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-27-2025 05:01 PM
Hi can you tell me what are your trigger conditions i need to make the samething thanks !!