How to Bypass a PeopleSoft search record
By Chris Malek | Wed, Oct 31, 2012
There are many times where you do not want a user to see a standard PeopleSoft “search page” on a component.
- A self service page where the end user may not be familiar with the concept of a search page
- A custom page where you want a different search experience that the standard PeopleSoft experience.
Below are a few ways to bypass the search record.
Set the INSTALLATION table as the search record
If you set the INSTALLATION table as the search record:
- The component processor will not show the search record.
- The component processor will load level zero with the first row returned by the database for any tables and views.
- The component will load and any grids or scroll areas that are set to auto-select, will pull all rows back from the database.
A common scenario when using this method is to actually disable the auto-select on all the grids and scroll areas. This tells the component to not automatically perform SQL based on the search record row used. Instead you are basically telling the component: “Do not do any magic. PeopleCode is going to run which will load the data.”
Set any record with no search keys as the search record
If you use any search record that does not have any search keys defined on the record definition, then it will work exactly as the INSTALLATION table example above.
Set and Disable Search Keys with PeopleCode
You can also bypass the search record by setting the search key values
in code, then making the search fields in-visible (FIELD.VISIBLE=FALSE).
This is done in SearchInit PeopleCode. You will also need to call this
peoplecode function in the searchInit: