Question
Calling an activity from web-login HTML rule.
Hi,
I want to call Rule-File-Binary.DownloadFile OOTB activity on click of hyperlink/button in web-login HTML rule. basically I want to download a binary file by clicking on hyperlink/button on login portal by sending a static param value (pzInskey of selected binary file).
I tried some of the options from old pdn posts, it is not working for me -
<a href="" onClick= myFunction() >Download Link</a>
OR
<button onClick="myFunction()">Download Link</button>
<script>
function myFunction()
{
oSafeURL =null;
var oSafeUrl = new SafeURL("Class.Activity",getReqURI());
oSafeUrl.put("Paramater Name","Paramater Value");
var strResponse = httpRequestAsynch(oSafeUrl.toURL(),"post");
}
</script>
above solutions are not working for me.
Please help me on this.
Thanks,
Pravin
To call an activity before login, the activity should be part of the Unauthenticated access group. And it should have "Allow direct invocation from the client" setting checked and "Require authentication to run" setting unchecked.
Similar post: https://pdn.pega.com/community/product-support/question/how-call-activity-or-flow-action-login-page-prpc
Hope this will help you.