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
- Open 2 Work Orders in 2 tabs ( 2 threads). Include provided js in the section.
- Perform Save in the 1st tab.
- Peform Save in the 2nd tab.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.