- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 09:34 AM
I am trying to find a way to get to the data that is stored in the comments field on the table kb_feedback. This table seems to not be extended from the task table so I have not been able to dot walk to the comments field. Here is what I am trying to do:
- after the user views a KB Article and decides to flag that article
- a ui script box comes up to fill in a reason (comments field) for flagging the article
- you fill in your reason and the data shows up on the knowledge feedback tab for that article (kb_feedback table)
- I have created a business rule that after the knowledge article is flagged to automatically create a knowledge task.
- on this task I am mapping the fields for the article, assignment group, adding data to the short description etc
- I am also wanting to map the data that was added in the UI Script reason field when the article was flagged and is now on knowledge feedback
- I can see my text in the comments field, but cannot find a way to map the data that is in the comments to the kb_task that I just created with the business rule (want to map to the description field). When I view the field it shows as kb_feedback.comments
Here is the script I am using on my business rule (is using the kb_knowledge table)
var kbtask = new GlideRecord("u_kb_task");
kbtask.initialize();
kbtask.u_knowledge_article = current.sys_id;
kbtask.short_description = "Knowledge Feedback for " + current.number;
kbtask.assignment_group = current.kb_knowledge_base.u_kb_task_group.sys_id;
kbtask.description = current.kb_feedback.comments;
kbtask.insert();
Does anyone know what mapping I can use or if since this table is not extended from the task table that it is not even possible.
Thanks
Nona Johnson
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 12:41 PM
How about adding the business rule to the kb_feedback table instead? Fire when 'flagged' is true.
var kbtask = new GlideRecord("u_kb_task");
kbtask.initialize();
kbtask.u_knowledge_article = current.article;
kbtask.short_description = "Knowledge Feedback for " + current.article.number;
kbtask.assignment_group = current.article.kb_knowledge_base.u_kb_task_group.sys_id;
kbtask.description = current.comments;
kbtask.insert();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 12:53 PM
Thanks - I did not think the flagged = true was on the feedback table, but it was so this worked great!
Appreciate your help - have marked your answer as correct
Nona Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2019 05:59 AM
Hello Nona,
Can you please guide me how you have created a ui script box comes up to fill in a reason (comments field) for flagging the article.
Thanks In advance.
Thanks
Mayur