- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-21-2019 09:16 AM
Hi All,
I am trying to create a ATF to create HR Knowledge Article. However I am unable to select Knowledge Base as a field itself when I have selected Set Field Values Operation for Table kb_knowledge.
It does not come in the list of fields and hence, I am unable to populate Knowledge base and the script fails.
Please advise.
Thanks,
Vish
Solved! Go to Solution.
- Labels:
-
Automated Test Framework
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2019 09:24 AM
I had this same problem. To solve it I had to run this as a background script.
It corrected it;
var gr = new GlideRecord('sys_atf_step');
gr.get('f1a43c15db0123008096a455ca961915');
var fields = gr.inputs.field_values.toString();
gs.info(fields);
fields = fields.replace('^EQ','^kb_knowledge_base=dfc19531bf2021003f07e2c1ac0739ab^EQ');
gs.info(fields);
gr.inputs.field_values = fields;
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2019 09:24 AM
I had this same problem. To solve it I had to run this as a background script.
It corrected it;
var gr = new GlideRecord('sys_atf_step');
gr.get('f1a43c15db0123008096a455ca961915');
var fields = gr.inputs.field_values.toString();
gs.info(fields);
fields = fields.replace('^EQ','^kb_knowledge_base=dfc19531bf2021003f07e2c1ac0739ab^EQ');
gs.info(fields);
gr.inputs.field_values = fields;
gr.update();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2019 11:12 AM
Thanks jacebenson for your help.
This solution works fine. However is there another way apart from using background script. The reason being background scripts can create an issue if coding is not correct.
Hence, trying to avoid the background script solution, though functionally it works well.
Thanks,
Vish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-25-2019 04:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-30-2019 02:53 AM
Hi vish,
As per my experience, i am are able to select "Knowledge base" as field value from drop down list of choose field , in set Field Values operation, when table selected is kb_knowledge.
