Change parent of child article

Gopal6
Tera Contributor

Hi there, 

I have a requirement where parent field in child kb article should be updated with the latest version of parent article if parent kb article version is changed.

Can anyone help me here how this can be implemented.

 

Thanks,

Gopal

6 REPLIES 6

Aman Kumar S
Kilo Patron

Hi @Gopal6 ,

You can have a business rule in place, where you can update knowledge article's parent field, whenever a parent knowledge is updated.

Create an After update business rule on the knowledge table

var parentKB = new GlideRecord("kb_knowledge");
parentKB.addQuery("parent", current.getValue("base_version"));
parentKB.query();
while (parentKB.next()) {
parentKB.setValue("parent", current.getUniqueValue());
parentKB.update();
}

 

Best Regards
Aman Kumar

Hi Aman,

Thanks for the reply. I have tried this but it is not working.

 

Gopal6_0-1668240776211.png

 

 

Gopal6_1-1668240794604.png

 

Aman Kumar S
Kilo Patron

Can you share what have you mentioned in the when to run tab?

Also, set the condition as version changes 

 

Best Regards
Aman Kumar

Hi Aman,

Gopal6_0-1668262489262.png