Relevant for you widget error

priya110
Tera Contributor

Hi,

Recently i updated the employee core application to recent verison 39.08, post update, The relevant for you widgets seems to be failing. has any one encountered this error?

priya110_0-1769045140913.png

Thanks

1 REPLY 1

kaushal_snow
Giga Sage

@priya110 ,

 

This error happens because the relevant for you widget server script is trying to call .toString() on a value that isn’t actually a native string.....which in servicenow often means a java/rhino object is being treated like a javascript string and causes this method incompatibility.....

 

so the fix is to review the widget server script and any script include it calls, ensure you aren’t calling .toString() directly on returned objects or arrays and instead safely coerce to a string or use primitive getters.....or adjust the script logic so it handles the data type correctly...... because servicenow throws this error when toString is used on incompatible objects rather than native strings......

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant/Developer