UI policy script error: TypeError: Cannot read properties of undefined (reading 'execute') error on portal

Rose17
Tera Contributor

Hi Team,

When the UAT instance was upgraded from Quebec to Rome, when i opened a catalog item(name- xyz) form on service portal, I got this error- There is a JavaScript error in your browser console.

I inspected and checked the console. It showed the error- UI policy script error: TypeError: Cannot read properties of undefined (reading 'execute').

There are several catalog ui policies and catalog client script written on this catalog item.

It is working on PROD without any errors.(PROD is not upgraded yet).

Could someone help me to resolve this issue?

@Ankur Bawiskar Your help is highly appreciable.

Thanks in advance.

 

 

 
 
17 REPLIES 17

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

So did you debug that catalog UI policy?

did you deactivate that and verify error was gone?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

yes, when I deactivated the UI policy, the error was gone. But that ui policy is needed.

what's there in that UI policy.

Did you debug it?

can you share screenshot of that?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

On a cat item, there is one multiple choice type variable- say A with choices-yes and no, and two single line text type variables- say B and C. 

So in that UI policy, when A is no, then B and C must be visible and mandatory.