We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Hide choice in interaction state field failed in ATF

Not applicable

Hi,

 

I have created below client script to hide state choice based on condition. Its working fine but getting failed while testing using ATF.

 

function onLoad() {
if (g_form.getValue('state') == 'new'){
    g_form.removeOption('state', 'on_hold');
}
if (g_form.getValue('state') == 'on_hold'){
    g_form.removeOption('state', 'new');
    g_form.removeOption('state', 'closed_abandoned');
    g_form.removeOption('state', 'closed_complete');
}
if (g_form.getValue('state') == 'closed_abandoned'){
    g_form.removeOption('state', 'new');
    g_form.removeOption('state', 'work_in_progress');
    g_form.removeOption('state', 'on_hold');
    g_form.removeOption('state', 'closed_complete');
}
if (g_form.getValue('state') == 'closed_complete'){
    g_form.removeOption('state', 'new');
    g_form.removeOption('state', 'work_in_progress');
    g_form.removeOption('state', 'on_hold');
    g_form.removeOption('state', 'closed_abandoned');
}
}
0 REPLIES 0