ATF Set Variable Values (SP) step failing after adding AI Search on select box variable

tanvipalkar
Tera Contributor

Question:

I am facing an ATF issue after implementing AI Search on a Service Portal catalog item.

 

I have a select box variable called Problem Type. Earlier, ATF was able to set this value using the Set Variable Values (SP) step without any problem.

 

Recently, I implemented AI Search:

 

I added an onChange client script on the Problem Type field.

 

This script gets the display value of Problem Type.

 

It stores the value in a hidden text variable (used for AI Search).

 

AI Search uses this hidden field to show KB articles.

 

function onChange (control, oldValue, newValue, isLoading) {

 

if (isLoading || newValue == '') {

 

return;

 

}

 

//Type appropriate comment here, and begin script below.

 

var displayValue = g_form.getDisplayValue('problem_type'); g_form.setValue('ai_field', displayValue

}

After this change:

 

In ATF execution, the Problem Type value is set correctly

 

AI Search works and KB articles are shown

 

But the ATF step fails with this error:

 

Client error: security constraints prevent displaying information: no thrown error

 

Because of this, ATF skips all next steps.

This issue happens only in ATF. For normal users, everything works fine.

Is this error caused by the onChange client script updating another hidden variable and triggering AI Search?

What is the recommended way to avoid this ATF failure?

 

Any help will be appreciated.

0 REPLIES 0