Question

15
Views
Stephen Miller (Stephen Miller)
US Air Force
Web Developer
US Air Force
US
Stephen Miller Member since 2021 2 posts
US Air Force
Posted: March 9, 2021
Last activity: March 10, 2021
Posted: 9 Mar 2021 18:59 EST
Last activity: 10 Mar 2021 4:55 EST

How to print contents of popup window

I'm attempting to print the harness displayed in a popup window following the method in this post:

https://collaborate.pega.com/question/how-do-you-print-preview-current-screen-without-altering-printview-harness

but I'm having trouble following how they implement this, or how they are creating this "method".

I understand method in context of Java, but not in context of Pega. There is no "method" Pega rule, is there?

I created a button, and from the button I created an action set so that when I click I run an activity, and from in the activity I select a java method, and in the java window enter "window.print()" and I get the error message: "window cannot be resolved"

I've tried creating a Function and entering the code from the post, but I cannot get the code to compile. It doesn't like the token "function".

Some other methods i've tried include:

  using the Print action, but it doesn't print what is on screen, it prints something else

 setting the script on the harness that is displayed (from the Scripts & styles tab in the harness) to harness_print, and this prints the right thing, but does so when the window is opened instead of when the button is clicked

***Edited by Moderator: Pooja Gadige to add platform capability tag***
Pega Platform 8.1.8 User Experience