Sunday, April 5, 2020

Open External URLs using Oracle Function

Oracle EBS seamlessly lets us open OAF pages via Functions but there isn't a straight forward way of calling a webpage/external URL via a Function.


Below trick lets us a function which can be attached to a menu to open any external URL.


Create a new function in EBS with below details -


Type: SSWA jsp function


Web HTML: oksAutoRenewalHelp.jsp?thanks=http://www.amazon.com


oksAutoRenewalHelp.jsp is a standard jsp provided by Oracle which simply redirects the http/https request to the URL mentioned in the parameter thanks.

Here, you can mention any external URL as indicated above in bold. Attach the function to desired menu and when clicked, it will open the external URL.



However, above trick will open the external URL in same window.

So what if you want to open the URL in new browser window, thereby retaining the EBS responsibility navigator page ?

To achieve this, you'll need to create a custom jsp (similar to standard one) using below code snippet and use this jsp file in Function definition. This will simply open the URL mentioned in LINK parameter in a new browser window -


<script>

<%out.println("var url=\"" + request.getParameter("LINK").trim() + "\";");%>

var load = window.open(url,'','resizable=yes');history.go(-1);

</script>


Share:

0 comments:

Post a Comment