Client Script Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I am getting below error when submitting the catalog item request on the RITM Page on the requested for field.
onChange script error: TypeError: Cannot read properties of undefined (reading 'process') function(control, oldValue, newValue, isLoading) { window.CatalogDynamicValue.process(control, oldValue, newValue, isLoading, '130185880fa17500dcc800dce1050e09', '["d9646b46db5fc25085397856f3961964"]', false); }
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @rutujalande
From your 121256.png screen shot, it seems call back function is missing in your getReference method.
syntax should be
g_form.getReference(fieldName, callBackFunction);
Sample Script to set manager : Can you try with it.
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
var userRef = g_form.getReference('requested_for', setManager);
}
function setManager(userRef) {
if (userRef) {
g_form.setValue('manager', userRef.manager);
}
}
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti