Friday, August 26, 2011

GenerateComponentContentURL() Fail

We have a custom PeopleSoft module that handles requests from another web application. After authentication, this web application initially forwards the request to an iscript that, after identifying the user, redirects her to the appropriate home page. The redirect URL is created using the built-in PeopleCode function, GenerateComponentContentURL(). Here is an example:
%This.approverHomePage = GenerateComponentContentURL(%Portal, %Node, MenuName.MY_MENU, "GBL", Component.MY_HOME, "", "");

This was working fine until the web application was updated. At that point, the redirect started to fail silently. After a lot of false starts, I determined that GenerateComponentContentURL was returning an empty string, but I could not figure out why.

Long story short, the newly-configured web application was using a URL for the iscript that had an invalid node. The url was:

but should have been:

This caused %Node to return PSFT, an invalid node. One would think that GenerateComponentContentURL would throw an exception in this case, but it just returned an empty string. I also find it interesting that even with an invalid node in the URL, the iscript still ran.

Thus is life customizing PeopleSoft.


  1. I can definitely relate to that :-)

  2. PSFT_HR will work, but shouldn't it have been HRMS? The GenerateXXX functions look for content in the portal registry, which has metadata containing portal nodes. PSFT_HR is an integration/SSO node. Both PSFT_HR and HRMS point to the same location, but HRMS is usually the "portal" node hosting content for the HRMS system.

    And, as a quick security note... I assume that PSFT_HR is not really your HR production's default local node name, because as I'm sure you know, the node name is tied into the security token, making it possible to carry tokens between systems that share the same node name.