Question
Virtusa
US
Last activity: 20 Jul 2016 4:44 EDT
Set Authorization headers
Hi ,
I trying to open a url from action "Open Url in new window" for an on click event of a link .
Need to set the username and passwrod in the request headers so that user need not manually enter the credentials to open the URL
Pega Version : 7.2
***Updated by Moderator: Vidyaranjan. Removed user added #helpme tag. Apologies for confusion, shouldn't have been an end-user option*** ***Included Category***
Appreciate your response .
Thanks.
Hi Adhithya,
Try doing following way and see whether it helps or not.
Use the following script in UserWorkForm or A non-auto generated section.
<script type="text/javascript">
function openURLWithCredentials()
{
var externalURL ="Your URL";
var userName="Username";
var password="Password";
window.open(externalURL+'?username='+userName+'&password='+password,"");
}
</script>
On the action tab, instead of using " Open URL in window" action use "RunScript" action and give the method name "openURLWithCredentials"
Please note that key values "username" and "password" in window.open method should be same as external website keys.
Let me know for any queries.
Thank you,