GenerateComponentPortalURL and GenerateComponentContentURL return NULL

1. Because these functions are being called outside of PIA, certain online system variables such as %Portal and %Node will also be NULL. As such, it will be necessary to hard-code some arguments to the GenerateXXXURL functions:

GenerateComponentContentURL("EMPLOYEE", "ERP", MenuName.REQUISITION_ITEMS, "GBL", Component.REQ_APPROVAL_AMT, %Page, "U", &Rec);


2. The Base URI (e.g. http://www.myserver.com/psp/mysite/) is only available automatically in the context of a web server. If a process is not signed in via the web (e.g. Application Engine), the Node definition specified in the function is checked for that Base URI.

Open the Node Definition (PeopleTools > Portal > Node Definitions) and enter the Content URI (.../psc/...) and Portal URI (.../psp/...) on the Portal page. These are used by the GenerateComponentContentURL and GenerateComponentPortalURL functions, respectively. By default these fields are empty.

3. The GetLocalNode method of the Session object returns the Content Provider Node (e.g. "HRMS") when triggered from a Component. In a batch process, this method returns the Default Local Node (e.g. "PSFT_HR"). Since a Content Reference is typically associated with a Content Node, the Default Local Node cannot be used in AE or Message Subscription code to build a Component URL.

Instead of trying to dynamically determine the Local Node using %Session.GetLocalNode(), it may be necessary to hardcode the Node name in PeopleCode, as shown above.

Alternatively, the Content Reference's Node can be changed to LOCAL_NODE in PeopleTools > Portal > Structure and Content. In order to take effect, this change may require clearing Application Server and Process Scheduler cache.

Comments

Popular posts from this blog

Peoplesoft SFTP

How to find the Java Version being used by WebLogic

Peoplesoft Error: All Processing Suspended: Restart OPRID=PS, RUNID=RUN01, PI=5000(108,503)