Testing g_form in Chrome console

Giri6
Tera Expert

Is it possible to invoked methods on g_form in the console of chrome? I tried and it did not find the object. Wondering if there is any wrapper or  in anyway. Appreciate it.

10 REPLIES 10

gregorZeiler
Tera Contributor

Hello Community,

to use the g_form in the browser console, it is (sometimes) necessary to change to the gsft_main frame.

Therefore, take a look at the following ServiceNow Knowledge Article:
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0695239

 

Then it is possible to create e.g. an alert - alert(g_form.getValue('<variableName>')); - or
to print something - console.log(g_form.getValue('<variableName>')); - to the browser console.

 

Do not forget the single quotation marks 'šŸ˜'.