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

JavaScript Error occurs after commit

SA-9154

Summary



When you perform commit with multiple work objects open in different tabs, you get a JavaScript error. 



Error Messages



There was an error when loading the content given. Found HTML Tag in the given content which is not valid. IE Error descripttion: Unknow runtime error.

Steps to Reproduce

  1. Open 2 Work Orders in 2 tabs ( 2 threads). Include provided js in the section.
  2. Perform Save in the 1st tab. 
  3. Peform Save in the 2nd tab. 
  4. Js error is displayed. 

Root Cause



This is an issue with the design. The DB commit operation is being performed in "SaveCustom" activity through "save" button.This triggers the transaction ID change because of which transaction mismatch is occuring. This behaviour is expected as per the design.

Resolution



The below Local-change helps to resolve the issue:

1.  Activity – Save



Step1: commit method is used
Step2: Page of the class where the localchange section is configured. Here it is, Data-Admin-Operator-Id.
Step3: 'localchange' section - this will print the transaction id. 

<%=tools.getRequestor().getRequestorPage().getString("pxClientExchange")%>




2.  Refer the localchange section in the same section where the Save button is configured.


3. Section - OperatorDetails - Added "Save2" button with "RunActivity", "RunScript" and "ReloadSection" actions.

Published April 28, 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