Search This Blog

Oct 22, 2012

SetNamedSearch Method



SetNamedSearch Method

How to use SetNamedSearch method in the Siebel eScript ?

Example:

If the Siebel Administration logs into Siebel application and click on the Contact Screen. It should only show the contacts who’s contact method is E-mail.

For this requirement we can use SetNamedSearch method in Business Component script.

Note:  This requirement is only for [Visible Contact List View].

  1. Login into Siebel Tools with SADMIN/SADMIN connecting for Sample database.
  2. Click on the Business Component in the Object Explorer.
  3. Query for a Contact Business Component and Lock the project.
    1. Use [ Alt + L ] to lock the project.
  4. Right click on the Business Component and Click on the Edit Server Script.
  5. Locate the following method. [BusComp_PreQuery ]
  6. Now write the following script to implement this requirement.

function BusComp_PreQuery ()
{
        TheApplication().TraceOn("D:\Setname.txt","Allocation","All");
       
        if(TheApplication().GetProfileAttr("Position") == "Siebel Administrator")
        {
                        TheApplication().Trace("Inside f Block");
                        this.SetNamedSearch("EmailContacts" , "[Preferred Communications] = 'E-Mail'")
        }
        TheApplication().Trace("View Name : " + sActiveViewName);
        TheApplication().Trace("Position Name : " + TheApplication().GetProfileAttr("Position") );
       
        TheApplication().TraceOff();
        return (ContinueOperation);
}


Explanation:
This.SetNamedSearch(ExprName, “[fieldname] optr ‘value’ ”);

  1. Compile the BC and Test.

Default Focus User Property in Siebel

Default Focus user property is used to put  default focus on specific column of an list applet. We recommend reading article  Introduction of Default Focus user property before going through the details of three user properties under DefaultFocus Applet user property in Siebel.
There are three user properties to set the default focus in siebel.


1. DEFAULTFOCUS_EDIT              
2. DEFAULTFOCUS_NEW           
3. DEFAULTFOCUS_QUERY

Siebel IP 2017 - Web Tool Development Steps

Siebel IP 2017 Development and Deployment Steps : 1. Click on the Workspace Icon in Siebel Web Tools application. 2. Create a New work s...