Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Virtual Agent Query

R3D0
Tera Contributor

Hello together,

 

I have a problem with following code:

 

(function execute() {
 
var grCondition = new GlideRecord('u_routing_information');
grCondition.addQuery('u_kb_knowledge', '090f45ab1b080614354d96859b4bcb7a');
grCondition.query();
grCondition.next();

var ausgabe = grCondition.u_condition;

return ausgabe;
})
 
If I execute this script in "Scripts - Background" it works perfectly but as soon as I try to return it via VirtualAgent it doesn't work anymore. 
 
Maybe anybody has some hints for me.
 
Best regards
Dominik
0 REPLIES 0