Tuesday, January 5, 2010

Force Search Processing


Sometimes you want to suppress Search dialog box during the Page display. You must understand the default search dialog box processing and then determine what can you do to alter it programmatically.

At Component Definition Level under Use Tab after Add Search record, there is a checkbox Force Search Processing. The Default is cleared which means do not display the search dialog box, if following conditions are true.
*All required keys have been provided (either by system defaults or by PeopleCode)
*If this an Add dialog box, then no "duplicate key error" results from the provided keys; if this error occurs, the processing resets to the default behavior.
*If this is a Search dialog box, then at least one row is returned based on the provided keys.If you select the Checkbox Force Search processing, then even if the above conditions are true, system will always display the search dialog box.

To alter the search dialog box behaviour programmatically, irrespective of Component Definition Force Search Processing checkbox, You need to use SetSearchDialogBehavior(force_or_skip if possible) function in SearchInit event of the SearchRecord-> SearchField or at component level Search Record. for skip if possible use value 0 and for force display use value 1

0 comments:

Post a Comment

Total Pageviews

Copyright © Tech & Management Notes