Knowledge "Article body" field is auto updating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2022 11:29 AM
Steps to replicate
1. Change anything on a knowledge article aside from the Article body "text" field (You can update "Valid to" or "Short description" as sample fields)
2. Check the Record History (List).
3. Notice that aside from the field you updated you can also see logs showing you that the Article body (text) field was also updated.
It seems that the formatting of HTML tags is being updated by something. This also happens on an OOB personal dev instance.
What is causing this and how can we stop this from happening?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2022 11:45 AM
Hi,
AS per my knowledge, audits on fields are only recorded when field value changes. Did you check the Update time, Old value and New value columns of Article field in the record logs/history ?
It might be the case that you were observing those audits for Article field which were done before.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 06:21 PM
Hi,
The timestamps are the same as when I did the update on the other field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-24-2022 12:11 PM
Hi Sean,
I cannot replicate on my dev instance (Rome).
Does the change happen AFTER you submit the form?
Could you turn Business Rule Debugging on and see if that gives you any helpful info?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-26-2022 06:33 PM
Yes, It happens on Submit. I am able to replicate it on my PDI as well as on multiple clients that we have.
Adding further findings after playing around with it some more.
1. If you run a background script to update the article it does NOT change the Article body and this is without using setWorkflow(false) and autoSysFields(false) on the script.
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('sys_id', 'f40da43187032100deddb882a2e3ecc5'); // change this sys_id
gr.query();
if(gr.next()){
//gr.setWorkflow(false);
//gr.autoSysFields(false);
gr.short_description = gr.short_description + ' Test';
gr.update();
}
2. You don't even have to change any field on the form. If you go and open an article and just hit save you get the issue.
3. If you update the article from the list view the issue does not occur but as soon as you save or update anything while you are on the KB form the issue happens. This is telling me that whatever is causing the issue might be on client side related.
3. If I turn off all business rules and client scripts, I still get the issue.
I noticed that the content of the article itself is not changed. What is changed are
History Logs shows
Old Value
<p>DESIRED<br />Contract Account:<br />Steps Taken:</p><p> </p><p>OPTIONAL<br />Screen Name:<br />Screen Print (include as attachment)<br />Premise:<br />Connection:<br />Business Partner:</p>
New Value
<p>DESIRED<br />Contract Account:<br />Steps Taken:</p><p> </p><p>OPTIONAL<br />Screen Name:<br />Screen Print (include as attachment)<br />Premise:<br />Connection:<br />Business Partner:</p>