Defining the View
This task is a step in Process of Creating Dynamic Picklists That Use a SalesBook Control.
In this topic you define the view.
To define the view
Add a view that Siebel CRM Desktop uses to display the list of values in the SalesBook dialog box.
For more information, see Code That Creates the View Definition That the SalesBook Control Uses.
Open the lookup_view_defs.xml file and then locate the following code. This code resides at the beginning of the file:
<array key="all_lookup_types">
You specify the objects that define the SalesBook dialogs in the lookup_view_defs.xml file. For more information, see Customizing the SalesBook Control.
Add the following lookup type to the array you located in step 2 :
<lookup_view_def key="lookup:fulfillment-centers"> <display name="Fulfillment Centers"></display> <filter dasl="([http://schemas.microsoft.com/mapi/proptag/0x001A001E] >= 'IPM.Contact.SBL.Fulfillment_Center' AND [http://schemas.microsoft.com/mapi/ proptag/0x001A001E] <= 'IPM.Contact.SBL.Fulfillment_Center')"></filter> <view id="fulfillment_centers:salesbook"></view> <quick_lookup dasl_format="[http://schemas.microsoft.com/mapi/id/{00062004- 0000-0000-C000-000000000046}/8005001E] ='%s'"></quick_lookup> <type id=""></type> </lookup_view_def>
This code does the following:
Hard codes the label for the display name. In an actual implementation it is recommended that you add resource strings to the resource file and that you replace this hard coding with references to these resource strings.
Specifies the object name in the filter.
Uses the view Id to reference the view that you define in step 2.
Uses the type Id to specify the type of object that Siebel CRM Desktop creates if the user clicks the New button in the SalesBook dialog box. Leaving the New button empty disables it in the SalesBook dialog box.
Add the salesbook control to the Opportunity form. Do Modifying the Form to Support Static Picklists, but use the following code:
<stack layout="horz" spacing="3"> <cell> <autocomplete id="jvd_fulfillment_center_id"> <field>JVD Fulfillment Center Id</field> <source type="Fulfillment Center"format=":[:(Name) :]"> </source> </autocomplete> </cell> <cell size="21" attraction="far"> < button id="btn_fulfillment_center_select" image="lookup_button" > <text>...</text> </button> </cell> </stack>
This code adds an autocomplete list and links the JVD Fulfillment Center Id field to this text field. This text field allows the user to enter characters for the name of a fulfillment center. Siebel CRM Desktop displays an autocomplete list while the user enters these characters. The Fulfillment Center object provides the values that Siebel CRM Desktop displays in the autocomplete list, and also specifies to display the Name field in the autocomplete list. This code also adds a button that opens the SalesBook dialog box. For more information, see Registering Autocomplete Controls.