Why g_form.getOption() method not working & throwing console error?

Ankita Kolhe
Tera Contributor

Hi Community,

For the below On change client script, getting browser javascript error & alert() is not working.

 

AnkitaKolhe_0-1679896990601.png

 

Could anyone please help what's the issue with this function?

 

Thanks,

Ankita

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Ankita Kolhe ,

getOptions is NOT supported in the Service Portal, so you have to find an alternative, please try the below suggestions.

g_form.getOptions not working in the portal. alternative 


Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

When people say "it won't work in Portal" does that also mean on a workspace record page as well?