Skip to main content

Posts

Showing posts with the label SetSearchSpec

How to sort and add search specification in Siebel Applet Load script

Normally we use Search specification filed in Applet List, but sometime we have to add long search expression which Search specification field can not contain (max length is 255 characters). For that we can add search specification in applet load server scripts. Right click on applet and from menu click on "Edit Server Scripts". From functions list click on "WebApplet_Load". First get the bussiness component by follow below script var oBusComp = this .BusComp () ; Now add with (The ' with ' statement adds the given object to the head of this scope chain during the evaluation of its statement body.) and statement Add Sort specification as below SetSortSpec( "Created(DESCENDING)" ); Now write search specification on the desired fields for mvl field you need to use "EXISTS". var Search1 = "EXISTS ([Case Contacts] = '" + case_id + "')" Using AND/OR you can extend the search specification. var Search1 = "...

How to add SearchSpec (query) on Applet Load Event through Applet Server Script in Siebel

If record is found every time when user navigate to Applet that record will be displayed. If record is not found Applet will be empty but user can use Query to found desired record. function WebApplet_Load () { var currBC = this.BusComp();     with (currBC)     {        SetViewMode(AllView);        ClearToQuery();        SetSearchSpec("SSN", "abc123xyz789");        ExecuteQuery(ForwardOnly);     } }