Download file from link without opening a new window

We have a requirement to start downloading attachments stored in another non-Pega application.

We can retrieve the file contents and information through a service and we already found a way to do so using the “Open URL in window” action on the link, but our client is asking if it possible to do so without opening a new window or a new tab.

Is there any way?

Since the attachment is stored outside Pega, we cannot use “pega.ui.HarnessActions.doAttachmentSingleClick” script.

@SilviaZ3 - When using “Open URL in window” use “_self” as the “Window Name” parameter. This would download the file in the same window.

@SuditSNG It works!! Thanks!