Info
Content

Transfer


Transfer is one of those PeopleCode functions that needs more explanation and some better examples.

This is the official syntax:

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

New Instance can be either true or false. True means you want to create a new window, false means that it will reuse the existing window.

To figure out the values for MENUNAME, BARNAME, ITEMNAME, and PAGE, query the PSAUTHITEM table. You can use the following query provided you know the menu and page names. The more you know, the better. Remember that this returns all permission lists (CLASSID) associated with menu item:

select * 
from PSAUTHITEM
where MENUNAME = 'YOUR_MENU'
and PNLITEMNAME = 'YOUR_PAGE'

The corresponding values in this table are:

  • MENUNAME = MENUNAME
  • BARNAME = BARNAME
  • ITEMNAME = BARITEMNAME
  • PAGE = PNLITEMNAME

You have the following actions available (%Action):

  • A = add
  • U = update
  • L = update/display all
  • C = correction
  • E = data entry

Make sure that the users will have the appropriate action available on the page you are transferring to. This is where the AUTHORIZEDACTIONS field in the PSAUTHITEM table can be handy - this tells you which authorized actions correspond to which permission lists.

Here's a simple example of how to transfer to the application entry component in Campus Solutions, reusing the existing window and entering in add mode:

Transfer(False, MenuName."PROCESS_APPLICATIONS", BarName."USE", 
ItemName."APPLICATION_DATA_ENTRY", Page."SCC_BIO_DEMO_PERS", "A")

If the user does not have access to a particular component, transfer will give an error like this:

You are not authorized for this page.

Check that the user has access to at least one of the relevant permission lists for where they are being transferred.

A transfer can also take you to a blank page, even though you have specified a valid menu item. In this case:

  • Double check your transfer code - are you sure you have the correct parameters?
  • Open your component/page and confirm they do not have any problems
  • Open your menu, and bar item, confirm they are correct
  • Check your menu/component search records if you are passing parameters search parameters.

One way this can happen is if the search record has been overridden at the menu level and the search record does not exist/has not been built in application designer.

NOTE: a trace may not necessarily tell you that the record is missing/not built so be sure to check your menu search record and your component search record both exist.
No Comments
Back to top