The users cannot see the knowledge articles that have attachments in knowledge homepage when the domain of those articles are changed. There will be a console error in the knowledge homepage as well. In some cases, knowledge articles will be visible but not the attachments.




When the domain of the knowledge article containing the attachments is changed, the domain of the attachments will be the same as the previous domain.

As the domain of the article and the attachment is different, the users will not be able to see the articles when the user searches for those articles from knowledge homepage


In order to resolve the issue, the user has to manually change the domain of the attachments too. The customers can use the following script to change the domain of the attachments whose domain is different than knowledge article.

var att = new GlideMultipleUpdate('sys_attachment'); 
att.addQuery('table_name', 'kb_knowledge'); 
att.addQuery('sys_domain', 'OLD_DOMAIN_SYS_ID') 
att.setValue('sys_domain', 'NEW_DOMAIN_SYS_ID_'); 

This script will move the attachments to the new domain.

If the user wants to change the domain of the article, make sure to change the domain of the attachments as well using a business rule.


Article Information

Last Updated:2018-09-20 18:52:20