Code That Renders an Autocomplete List
This topic describes the code that renders an autocomplete list. For more information about autocomplete lists, including the parent and child relationship that they use, see Registering Autocomplete Controls.
The following code renders an autocomplete list:
<autocomplete_list id="mvg_name" tab_order="tab_order">
<items format=":[:{child_Id@child_object_type/(:[:(child_fields):])}:]">
<source type="auto" name="search_string"/>
<restriction>:
<binary field="parent_field" condition="eq">
<value type="variable">id()</value>
</binary>
<binary field="child_field" condition="ne">
<value type="string">deleted</value>
</binary>
<suggestion format=":[:(autocomplete_source):]">
<source type="auto" name="autocomplete_source_object_type"/>
</suggestion>
</autocomplete_list>
where:
mvg_name identifies the name of the MVG control.
tab_order sets the position for the control that CRM Desktop makes active if the user presses the TAB key.
child_Id identifies the object that contains the Id of the object that Siebel CRM Desktop displays to the right of the semicolon in the MVG field.
child_object_type identifies the type of object that Siebel CRM Desktop displays after the semicolon in the MGV field..
child_fields identifies the fields that Siebel CRM Desktop displays after the semicolon in the MVG field. You can use the following format to specify more than one field:
"[:(field_name):]:[:(field_name):]:[:(field_name):]"
Siebel CRM Desktop adds each field consecutively after the semicolon. For example, assume you specify the following:
(:[:(Street Address):] :[:(City):], :[:(State):] :[:(Postal Code):] :[:(Country):])
In this example, Siebel CRM Desktop displays Main Street: Los Angeles CA: 94865: USA. The character that occurs between the brackets specifies the separator. This example uses a colon:
]:[
search_string includes the association that Siebel CRM Desktop uses to search in Outlook and in DB_FACADE. DB_FACADE is the native storage that Siebel CRM Desktop uses. It searches for an association object. An association object is a type of object that Siebel CRM Desktop defines in the siebel_basic_mapping.xml file.
parent_field identifies the field that Siebel CRM Desktop uses as the source for the field that it displays before the semicolon in the MVG field. Siebel CRM Desktop restricts the child fields that it displays to only fields that are children of the field that left_field identifies.
child_field identifies the field that Siebel CRM Desktop uses as the source for the field that it displays after the semicolon in the MVG field. Siebel CRM Desktop displays this field the first time it displays the MVG. If the user uses the autocomplete list to modify this field, then Siebel CRM Desktop sets right_field to the value that the user chooses.
autocomplete_source identifies the fields that CRM Desktop uses as the source for the values that it displays in the autocomplete list. You can use the same format that child_fields uses to specify more than one field. To view an example autocomplete list, see Overview of Customizing Multi-Value Groups.
autocomplete_source_object_type identifies the object type of the objects that autocomplete_source contains.
For example, the following code renders an autocomplete list in the Business Address field:
<autocomplete_list id="business_address_mvg" tab_order="27">
<items format=":[:{Business AddressId@Business_Address/(:[:(Street Address):]
:[:(City):], :[:(State):] :[:(Postal
Code):] :[:(Country):])}">
<source type="auto" name="Account.Business_Address.Association"/>
<restriction>
<binary field="Business AddressId" condition="eq">
<value type="variable">id()</value>
</binary>
<binary field="Status" condition="ne">
<value type="string">deleted</value>
</binary>
</restriction>
</items>
<suggestion format=":[:(Street Address):] :[:(City):], :[:(State):] :[:(Postal
Code):] :[:(Country):]">
<source type="auto" name="Business_Address"/>
</suggestion>
</autocomplete_list>