Fix script is not working

Community Alums
Not applicable

Hi All,

 

I have created a fix script to update some field in knowledge table. while running the script I am getting error from a another business rule script which is written for show published KB article in template it will run as before query in Knowledge table 

This is the business rule which run on before query in Kb_knowledge table

 

sangeetha10_0-1671714822140.png

When I run any other script related to Kb_knowledge table I am getting this error 

sangeetha10_1-1671714999107.png

Does anyone know how to rectify this

Please help

Thanks

2 REPLIES 2

Isaac Vicentini
Mega Sage
Mega Sage

Hi sangeetha10,

 

1. Check that your tagetName variable is getting the value correctly. To do this, place a log below line 7:

gs.info("Target Name: " + targetName);

 

2. Check that your targetName variable is indeed a String:

gs.info("Target Name is String: " + typeof targetName);

 

If not, use toString() on your targeName variable to convert it.

targerName = targetName.toString()

Best regards,

Isaac Vicentini
MVP 2025


If my answer was helpful, mark it as Helpful or Accept as Solution.

Community Alums
Not applicable

Hi @Isaac Vicentini 

I tried this method of changing the variable name but still getting the error

I checked it is a object how can we can that to string