Wednesday, September 13, 2017

"Invalid Transfer Parameters": How Do I Get My PeopleSoft Button to Transfer Me to Another Page?

One of the more irritating "features" of PeopleSoft is that when you write a Transfer statement in PeopleCode that uses invalid parameters, it's hard to tell what's going on, because nothing seems to happen. At first it appears that maybe your Pop-Up Blocker is blocking the new page from coming up.  In this article, I'll explain below how to make coding a Transfer statement much less painful.




One way to tell what's wrong with your Transfer statement is to look in the App Server log.  You may see "Invalid Transfer parameters" errors that look like this:

PSAPPSRV.15639 (2171) [2017-09-12T16:34:50.882 fgs@10.0.11.32 (CHROME 61.0.3163.79; WIN10) ICPanel] - - - (0) Invalid Transfer parameters:  Menu:  MAINTAIN_SERVICE_INDICATORS   Bar:  USE   Item:  SERVICE_INDICATOR_DATA (124,67)
PeopleSoft made it rather difficult to know which parameters to use in order to avoid this error, but the explanations below should help.  In Figure 1 below, you'll see a SQL statement that queries is the PSAUTHITEM table.  Note: Your item will not show up in the PSAUTHITEM table unless you've given security access to the menu/component on the appropriate permission list.

Figure 1.

The only parameter in the WHERE clause is related to MENUITEMNAME.  To find that value, navigate in the PIA (in your web browser) to the page that you want to Transfer to, and then press CTRL + SHIFT + J.  You should see a page like this:

Figure 2.
I've highlighted the Menu value in green in Figure 2 above ("MAINTAIN_SERVICE_INDICATORS").  That's the value that I used in the query illustrated in Figure 1.  The Component value also comes in handy.  Use that value to pull up the component in App Designer (Figure 3).  The Page value, highlighted in red in Figure 2, is where problems can occur. Figure 2 and Figure 3 illustrate how the problem does easily occur, and here's why.  Look at Figure 3 below, noticing that the "Page Name" value is different than the "Item Name" value.  This is what causes the bulk of the problems and confusion with coding a Transfer statement.

Figure 3.
One of the parameters in the Transfer statement is Page..  You would be tempted to think, using Figure 3 above, that, to provide that parameter, you'd want to write Page.SRVC_IND_SUMRY in your code.  You would be wrong. (Thus the red box around that value in Figure 3.)  It would be nice if the "Page." parameter were actually called the "PageItemName." parameter, because you have to supply the Item Name value, so, using Figure 3, you would need to write Page.SERVICE_INDICATOR_SUMMARY in order to have your Transfer statement work correctly.

Using the SQL query in Figure 1, you can see that the BARNAME for all items on that menu is either "INQUIRE" or "USE".  Since we've discovered that MAINTAIN_SERVICE_INDICATORS is the menu that we want to transfer to and that SERVICE_INDICATOR_SUMMARY is the "Item Name" of the page that we want to transfer to, we can see that we'll use the value of "INQUIRE" for the BarName. parameter in the Transfer statement.  

We can pull up the menu object in App Designer, and on the INQUIRE bar (see Figure 4), we can verify (from what we already saw in Figure 1) that the Menu Item name associated with the SERVICE_INDICATOR_SUMMARY page Item Name is ACTIVE_SERVICE_INDICATORS.  Thus the ItemName. parameter should be coded as ItemName.ACTIVE_SERVICE_INDICATORS.

Figure 4


(Refer back to the fully coded Transfer statement in Figure 1 to see what the coded parameters should be.)

One more item of interest here.  Notice in Figure 4 that the associated Component is named ACTIVE_SRVC_INDICA, and that its search record is called PEOPLE_SRCH.  In order for the Transfer statement to automatically bypass the search page of the component you're Transferring to, you'll need to create a record variable, whose key values are correctly supplied, to the Transfer statement.  Below is a snippet of code that creates the appropriate record object and satisfies the key values for the PEOPLE_SRCH component search record:

Figure 5

1 comment:

JSun said...

You saved my day!!