JavaScript error in your browser console - g_form.getParameter is not a function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2017 09:24 AM
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?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2017 11:42 AM
is this code on your client script? if yes, this will not work, what value are you trying to fetch?
var catalog_item_sys_id = g_form.getParameter("sysparm_id");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2017 11:47 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2017 09:38 AM
Hi Mic,
Check this blog it will help you
Adventures in Service Portaling: Populate Catalog Variable Values through the URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 06:26 AM
Hi mosowski1988-
Unfortunately the issue is central to Service Portal as it no longer recognizes the following methods under the g_form class (**):
Methods Not recognized via Service Portal under g_form
- addDecoration(fieldName, icon, title)
- addErrorMessage(message)
- addInfoMessage(message)
- addOption(fieldName, value, label, index)
- clearMessages()
- clearOptions(fieldName)
- clearValue(fieldName)
- getActionName()
- getBooleanValue(fieldName)
- getDecimalValue(fieldName)
- getEncodedRecord()
- getFieldNames()
- getIntValue(fieldName)
- getLabel(fieldName)
- getParameter() **
- getReference(fieldName, callback)
- getRelatedListNames()
- getSectionNames()
- getSysId()
- getTableName()
- getValue(fieldName)
- hasField(fieldName)
- hideAllFieldMsgs(type: "info | error")
- hideErrorBox(fieldName)
- hideFieldMsg(fieldName, clearAll)
- hideRelatedList(listTableName)
- hideRelatedLists()
- isMandatory(fieldName)
- isNewRecord()
- isReadOnly(fieldName)
- isVisible(fieldName)
- removeDecoration(fieldName, icon, title)
- removeOption(fieldName, value)
- save()
- serialize(onlyDirtyFields)
- setFieldPlaceholder(fieldName, placeholder)
- setLabel(fieldName, label)
- setMandatory(fieldName, isMandatory)
- setReadOnly(fieldName, isReadOnly)
- setSectionDisplay(sectionName, isVisible)
- setValue(fieldName, value, displayValue)
- setVisible(fieldName, isVisible)
- showErrorBox(fieldName, message, scrollForm)
- showFieldMsg(fieldName, message, type: "info | error", scrollForm)
- showRelatedList(relatedTableName)
- showRelatedLists()
- submit(submitActionName)
Hope this helps.
Regards,
Brit