Transfer function in PeopleCode

Recently had a chance to work on some PeopleCode to transfer control to a new page when clicking on a hyperlink – and here’s the syntax and sample code snippet:

Transfer(new_instance, MENUNAME.menuname, BARNAME.barname, ITEMNAME.menu_itemname, PAGE.component_item_name, action [, keylist] [, AutoSearch]);

new_instance — takes value of either true or false; used to specify if the new page should open in a separate browser window or open it in the same window as the calling PeopleCode event

Menuname – Name of the menu in which the page you want the control to be transferred is attached to – Eg: MANAGE_PAYROLL_PROCESS_(GBL)

barname – is usually the bar name of the menu to which the page has been attached to – bar names can be “Use”, “Process”, “INQUIRE” etc.,

menu_itemname – is the name of the component which holds the page to which you want control to be transferred to

component_item_name – is the same as the page name to which you want to open up when you click on the hyperlink

action – either of the following actions – ensure that the permission list attached to your user profile has access to this particular page under the specified mode. Otherwise, you would have to edit permissions (PeopleTools > Security > Permission Lists  and click on the Pages tab)



L(Update/Display all)



keylist – this parameter goes in conjunction with the next one(AutoSearch); think of it like this – you want the page to be opened in a new page, with all or some search key fields filled in – that is where keylist comes into picture. You can specify the key fields that will be used by the calling PeopleCode to enter on the search page of the target component

Autosearch – setting this parameter to true is the equivalent of entering values for search key field values on the search page and clicking on the search button – in short this would take an user directly to the actual page with all search key values populaed

Setting it to false will require the user to click on the Search button once control is transferred from the calling PeopleCode.

Note : keylist and Autosearch aren’t mandatory.

Sample code:


With Autosearch and keylist:

Local Record &rec;

&rec = CreateRecord(Record.SAMP_TBL); /* Search record of the target component */

&rec.EMPLID = “KU0002”; /* assign value to search key field (this example assumes EMPLID is the only search key on the target component) */

Transfer(true, MENUNAME.”MANAGE_PAYROLL_PROCESS_(GBL)”, BARNAME.”INQUIRE”, ITEMNAME.“COMP_GBL”, PAGE.SAMP_PG“U”,&rec,true ); /* Setting the last parameter to true would take the user directly to the actual page without displaying search results to the user */



About Manikandan Surendren

A PeopleSoft Techno-functional Consultant. An engineering graduate in Computer Science. Technology Enthusiast. Movie freak. Gadget geek.
This entry was posted in Code, PeopleSoft and tagged , , . Bookmark the permalink.

One Response to Transfer function in PeopleCode

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s