Error cannot read properties of undefined when loading forms
search cancel

Error cannot read properties of undefined when loading forms

book

Article ID: 408308

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Catalog CA Service Desk Manager

Issue/Introduction

When trying to load Service Catalog forms in Service Point, it fails to load certain data.

The following error appears in the F12 Developer tool Console tab when replicating the issue:

ERROR TypeError: Cannot read properties of undefined

Environment

Service Catalog 17.4 (Using a custom JavaScript function)

Service Point 17.4

Cause

The "_" being used in a custom function is replaced with some other data by lodash , due to which it is unable to find _.request.status

Resolution

1. Add the following code to the custom function created in the FileStore/scripts/custom_form_lib.js:

if(_.request == undefined){
            _ = ca_fd.getContext();
        }

2. Save Changes

3. Restart xFlow services

4. Remove cache from browser or try in an Incognito/InPrivate window.

Additional Information