Posted: 18 Jan 2019 10:09 EST Last activity: 24 Jun 2019 10:59 EDT
Open URL from activity in new tab or pop-up window
I have a URL attachment attached to the case and would like to open it automatically from an activity (as an example) in a new tab or in a pop-up window.
It is important that it should not open from a user action, like we know when you configure "Open URL in Window" from the action menu. It has to be done automatically in a post action of a flow action.
I think you need some sort of UI element to fire off the new tab/window. The best I can think of would be to use a method like Show-HTML to call a section which has some sort of onLoad function where you pass in the URL and call it from there. The suggestion of calling redirectAndRun might also work, if you want to call the URL in the Pega Context, but I'm used to calling that from the UI, so I'm not sure if there are any pieces missing to get that to work.
Back in January, I could present a different solution but now I got again a similar 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.