Wednesday, January 04, 2006

How To Skip Search Dialog Box

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.

  1. 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.
    a> All required keys have been provided (either by system defaults or by PeopleCode)
    b> 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.
    c> If this is a Search dialog box, then at least one row is returned based on the provided keys.

  2. If you select the Checkbox Force Search processing, then even if the above conditions are true, system will always display the search dialog box.

  3. 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

  4. Another way of skipping the search dialog box is to use a search record which do not have any search keys defined for e.g Derived/Work record. It can be any record as long as it does not contain any fields with search key attribute selected in record field property.

Note: The above methods to skip search dialog box (except records with no search key) only works, if you meet the condition specified in 1 i.e. all the key items has values and it returns at least one row and no errors occur. You can use SetSearchDialogBehavior to override component level setting in searchinit event. Also see this Post for more info. SetSearchDialogBehavior

Tip: (8.4x tools rel only) To directly navigate to a page with portal navigation

Link: http://server/servlet_name/SiteName/PortalName/

For components content parameters are : Page=pagename&action=action_value&key_id=key_value

If you do not specify the Page then it goes to the first page in component.

Action = A - Add, U - Update/Display, L - Update/Display All, C - Correction

KeyIDs are actual Field Name of the Search record that has search key attribute set.

To display a page and navigate to that page for e.g URL Maintenance Page the URL will be


where psp - Portal servlet, use psc - content servlet to go to page without portal navigation

Sitename = ps, Portal Name = Employee, Node Name = EMPL and Content Type = C for Component,

Content ID = <menu>.<component>.<market>

Menu = UTILITIES, Component = URL_TABLE, Market = GBL


Key Value: CMDOCDB

This link will open directly the URL Maintenance page with URL Definition of CMDOCDB.


Praveen said...

i've tried not to bypass the search page by using Force Search Processing checkbox...but it's not working...i've checked the box and accessed the's still bypassing it..any clue?

Unknown said...

I have a question about encoding. I made a web service which returns the JSON. I want to show Arabic characters but it appears like "??????". How can i set the encoding value.