- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2018 05:33 AM
Hello Experts,
We have BR to auto-create KB from incident. In description fields we put issue detail in multi line text. When KB created from incident then KB show all multi line text in single line. There is some issue in conversion of string field to HTML.
Adding BR, Incident and KB here.
var k = new GlideRecord('kb_knowledge');
k.topic = "temp Fix" ;
k.u_category = current.category;
k.u_sub_category = current.subcategory;
k.u_subject = current.short_description;
k.u_symptom_text = current.description;
k.u_cause_text = current.u_cause_text;
k.u_work_around_text = current.close_notes;
k.sys_created_on = current.assigned_to;
k.workflow_state = "draft";
k.short_description = current.short_description;
k.u_company = current.company;
k.u_partner_name = current.assigned_to.company.name;
k.source = current.sys_id;
k.u_incident=current.sys_id;
k.kb_knowledge_base = gs.getProperty("glide.knowman.task_kb", "bc6d656adb153200b75f719dae96192d");
//var grp = new GBPKnowledgeUtil().getGroupManual(current.company, 'L5') ;
//know.u_assignment_group = grp;
//know.insert();
k.insert();
Appreciate your prompt response here.
Regards,
RK
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-13-2018 02:02 AM
Hello Chuck,
Thanks for your response. There was no concern with fields as mentioned by creativethinker. I have added these line and commented kb.text only. its working fine.
var k= current.getValue('description');
var html1=k.replace(/\n/g,'<br/>');
kb.text=html1;
//kb.text = current.description.getHTMLValue();
Thanks for your input. Happy Friday:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-25-2022 07:11 AM
Hi Chuck,
For the same scenario, it is possible to convert table formate in to HTML field?
Regards,
ck.