Question
Credit Suisse
CH
Last activity: 9 Jul 2019 1:48 EDT
Open URL automatically in window when opening an assignment
Hello,
I got the following requirement:
When the user opens an assignment, a website should be automatically opened in a window. This website is needed to work on this assignment. The user doesn't want to make an extra click on the UI (e.g. link control) to open it manually.
I have tried to do this is PerformDefaults, as it should be just opened once. I have used Show-HTML method, but it is not working. My idea was to do with window.open('https://www.google.com'); as a test and if it would work then assembling the URL in the activity before using Show-HTML.
Has anybody implement a similar requirement and can help me figuring out how to do this?
Thanks in advance, Marcel
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
IN
Hello,
You can use the action set as below:
Where you can define on focus of an element or onClick or on the press of any key the new window will be opened.
-
Nelson Gómez
Credit Suisse
CH
Hi Evita, thank you for your answer. Yes, I know this option, but as I wrote the requirement is to open the URL automatically without the need of the user to click. When the user opens the case, the website should be opened as well in a popup.
So that means I am trying to launch a new window from server-side to open a URL.
Pegasystems Inc.
US
Hi,
I tried your requirement, and configured the below steps .
1.Use show-html method in the activity.
2.Create a html stream with the following code .
<script>
window.location.href = "https://www.google.com";
</script>
3.Pass that html stream to the show-html method.
I am able to open the url automatically without any click on using this configuration .
Credit Suisse
CH
Hi,
yes it is working when I run the activity directly from developer portal, but if I run it in e.g. PerformDefaults when the case opens, it is not. I think because there is no window there for Pega to show that HTML.
When the user opens the case, a popup window should open with that URL.
Pegasystems Inc.
US
Hi Have you tried by creating a new activity and giving that as a preprocessing activity in the flow action.
Credit Suisse
CH
Yes, I tried that. It is being executed (checked the tracer), but nothing is happening.
Pegasystems Inc.
US
Can you replace the script that I have provided earlier with the below script
<script>
window.open( 'https://www.google.com' ,' ','height=700,width=1000');
</script>
Credit Suisse
CH
Thanks, tried this as well and it is not launching the popup window.
Sopra Steria AG
CH
It seems that this is not possible. A new window needs to be opened from a user action (client side) and then HTML can be streamed into this window.