Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Open window error on opening a window from menu



Below message on UI is observed while trying to access a window from menu:
Open window error : 'cafescript' is undefined
This issue is reported only on IE11.

Error Messages

Open window error : 'cafescript' is undefined

Steps to Reproduce

1. Login as ccagent.
2. Open any mdi window using offerings.
3. The window opens successfully for the first time (positive case).
4. On accessing the same window again, the reported issue is observed(negative case).
5. However, the issue is resolved on accessing the window again and again.
NOTE : The reported issue is not replicable OOTB.

Root Cause

In desktop.js – extractApplicationMenuConfig(), for the below code:
var udmConfig = cafescript.createConfigFromXMLString(document.getElementById('unifiedDesktopMenus').innerText);

1. cafescript was undefined.
2. document.getElementById('unifiedDesktopMenus') was null,
for the negative scenario.


Below changes in desktop.js – extractApplicationMenuConfig() fixed the reported issue :
//Code change starts

               if(null != document.getElementById('unifiedDesktopMenus')){
               var cafescript = top.advisorDesktop.cafescript;
               var udmConfig = cafescript.createConfigFromXMLString(document.getElementById('unifiedDesktopMenus').innerText);
               udmConfig.traverse(findMenuConfigByLanguage, foundMenu);
//Code change ends

wherein , 
1. cafescript object was created explicitly.
2. A null check was placed for document.getElementById('unifiedDesktopMenus').


Published June 3, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us