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

OnClick events configured in section not working via HTML Rule

SA-17136

Summary



On Click events configured for Link or Button control in the section are not working when the section is embedded in the HTML Rule, Pega 716

Error Messages



On Click of link, nothing happens. No events in the tracer or no messages in the browser console.


Steps to Reproduce

1. Create a HTML rule (TestHTML) applies to Data-Portal Class with below HTML code.


<!DOCTYPE html>
<html>
<head>
<pega:include name="HarnessActionIframe" />
</head>
<body class="claro">
<div id=section>
<pega:include name="TestSection" type="Rule-HTML-Section" />
</div>
</body>
</html>

2. Create a Section rule (TestSection) applies to Data-Portal class, configure OOTB Link or Button control with on-click event and any action (Run Data Transform , Display Menu etc.)

3. Create an activity with Show-HTML step and configure HTML rule created in step 1 as parameter.

4. Run the activity manually using Actions -> Run , Select Copy existing page and click Create Page before executing the activity (Please find attached screenshot).

5. Click on the link displayed and observe that configured action does not trigger.


Root Cause



Your use case is not a Harness based and event infrastructure will not support it . So to make events work, we need to include Workformstandard HTML fragment, which will loads all related /dependent /support JS files

Resolution



Perform the following local-change:


<!DOCTYPE html>
<html>
<head>
</head>

<body class="claro">
<pega:include name="WorkFormStandard" />
<div id=section>
<pega:include name="TestSection" type="Rule-HTML-Section" />
</div>
</body>
</html>

 

Suggest Edit

Published January 31, 2016 - Updated October 8, 2020

Did you find this content helpful? Yes No

Have a question? Get answers now.

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

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