Client Script Down drop Options not coming in Fields ATF

ahmadfaiz20
Tera Contributor

Hi Everyone, 
We were trying to create an ATF, for Interactions. In the Type field we have added One option as "Walk-in" and Removed options as "Messaging" and "Video" using Onload Client script, 

 

ahmadfaiz20_0-1747204153864.png

 

While perform ATF for interaction to check the case, we are not getting the option the I have added, and default options are the only options available to select. 

ahmadfaiz20_1-1747204206930.png

Is there any way to test in the ATF for those cases?

client script that I used to remove is below

function onLoad() {
   //Type appropriate comment here, and begin script below
   g_form.removeOption('type','video');
   g_form.addOption('type','Walk-in','Walk-in');
   g_form.removeOption('type','messaging');
}

 

2 REPLIES 2

Sanjay191
Tera Sage

Hello @ahmadfaiz20 

please try to  check manually before this and some times it will checks on OnChange(as negative scenario) and  this client script run on  onload so whenever changes happened it will show only default choices because your client script is onload only.
and please check the some client scripts that are conflicting or not on this table
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You


ShivuPatil
Tera Contributor

Hi @ahmadfaiz20 ,

 

on which ATF step are you trying to select the option as “Walk-in”. If you’re using Set Field Values step, then the choices are read from sys_choice table and not from onLoad Script.

 

if you want test choices visibility in ATF, open the record and then use Click Custom Component step