Thursday, September 26, 2013

Using External Content in the FSCM 9.2 Links Pagelet (WorkCenters)

FSCM 9.2 comes with some great new WorkCenters. One of the features of the new FSCM WorkCenters is the configurable Links pagelet. With the links pagelet, you can add and remove links to information related to the WorkCenter's business process. One of the great features of the Links pagelet is that it allows you to set the starting page of a delivered WorkCenter. A current limitation of the Links pagelet is that it does NOT allow you to open external content in the WorkCenter's TargetContent area. To say it another way, you can add external content to the Links pagelet, but that external content opens in a new window. As usual, however, the only real limitation is imagination. Here is the method I developed that allows me to add external content to the Links pagelet and have it open in the TargetContent area: an iScript that redirects to the external content. I then register this iScript as a CREF and add it as a Link. The Links pagelet thinks the content is local, so it opens the external content in the TargetContent area. Here is the iScript:

Declare Function SpecifyPortalOpen PeopleCode FUNCLIB_PTPP.PTPP_PORTALR FieldFormula;

Function IScript_ContentRedirect()
   Local ApiObject &portal;
   Local ApiObject &cref;
   Local string &url = "";
   Local string &portalName = %Request.GetParameter("PORTAL");
   Local string &crefName = %Request.GetParameter("CREF");
   &portal = SpecifyPortalOpen(&portalName);
   &cref = &portal.FindCREFByName(&crefName);
   If (&cref <> Null) Then
      If (&cref.Authorized) Then
         &url = &cref.AbsoluteContentURL;

Here is how you use it:

  1. Create a CREF for your external URL
  2. Create a new CREF for the iScript. In the additional parameters section of the CREF, add PORTAL=EMPLOYEE&CREF=YOUR_CREF_NAME
  3. Update the new iScript CREF's security to match the external content CREF's security.

I use this technique with both OBIEE dashboards and Taleo.