JavaScript error in your browser console - g_form.getParameter is not a function

mosowski1988
Tera Contributor

Hello,

I have an error when using Portal, there is a onLoad Catalog Client Script with beginning:

var catalog_item_sys_id = g_form.getParameter("sysparm_id");

It work perfectly outside the Portal (using Try it or from Catalog) but in Portal I receive an error when item is opening:

There is JavaScript error in your browser console and details in the console says:

Error while running Client Script "Get Details2": TypeError: g_form.getParameter is not a function

It happens on the DEV instance (Jakarta).

It was working ok, but suddenly it stopped and I receive this error.

Can you help me?

6 REPLIES 6

Hi Britwill,

I am using getReference() function in my client side script, but its not working in portal. as u said the above methods are not supported in portal, is there any other way to achieve the same 

 

Thanks,

SHambhu

you can use glide ajax :

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/server_scripting/reference/r_ExamplesOfAsynchronousGlideAjax.html