Siebel CRM Desktop for IBM Notes Administration Guide > Customizing Picklists > Process of Creating Predefined Picklists >
Adding Fields to the Customization Package
This task is a step in Process of Creating Predefined Picklists. In this topic you add a field to the customization package. To add a field to the customization package
- Create a working set of files for the customization package:
- Open a Windows command line and then navigate to the directory that contains the current files of the customization package.
For more information, see Files in the Customization Package and Using the Windows Command Line to Set Optional Parameters.
- Create a copy of the current set of customization package files.
- Move the original set of files to a backup directory.
If necessary, to restore the configuration that existed before you started this customization effort, you can revert to this backup set of files.
- Create a working set of customization package files. You rename the set of files you copied in Step b.
For example, enter the following command:
rename v01* v02*
This command renames the prefix for all files in the directory that currently use v01 as the prefix. For example, it renames v01_forms.dxl tov02_forms.dxl. It is recommended that you use this technique to indicate that you have modified the customization package.
- Verify that Siebel Tools added the integration object:
- Use an XML editor open the siebel_meta_info.xml file.
For more information, see Files in the Customization Package.
- Locate the PickList_Preferred_Communications object. You search for the following code:
<object TypeId="PickList_Preferred_Communications"
- In the header of the PickList_Preferred_Communications object, make sure the following attributes exist and with the correct value.
|
|
IntObjName |
CRMDesktopPreferredCommPickList |
SiebMsgXmlElemName |
PicklistHierarchicalSub-Area |
SiebMsgXmlCollectionElemName |
ListOfCrmdesktoppreferredcommpicklist |
- Create the picklist. You add the following element to the siebel_meta_info.xml file:
<picklist TypeId='PickList_Preferred_Communications' CollectionTypeFld Name='Type' SrcObjectTypeId='PickList_Preferred_Communications' ValueFldName='Value' LabelFldName='Value' LangFldName='Language' > <master_filter_expr> <![CDATA] [Parent] = LookupValue ('OFFER_MEDIA', 'Package') ]]> </master_filter_expr> </picklist>
For more information, see Specifying Attributes of the Pick List Element.
- Add the Preferred Communications field to the Contact object:
- Locate the Contact object. You search for the following code:
object TypeID='Contact'
- Add the following code to the Contact object:
<field Name="Preferred Communications" Label="Preferred Communications" DataType="DTYPE_TEXT" HasPicklist="yes" PicklistIsStatic="yes" PicklistCollectionType="OFFER_MEDIA" PicklistTypeId="PickList Preferred Communications" IOElemName="PreferredCommunications" />
- Repeat Step 4 for each of the following objects:
- Add code that creates a map for the picklist between the Siebel Server and Siebel CRM Desktop for the parent Contact object:
- Use an XML editor to open the Ln_siebel_basic_mapping.xml file.
- Create a new object type for the picklist.
For more information, see Code That Creates a New Object Type for the Pick List
- Locate the parent object. You search the Ln_siebel_basic_mapping.xml file for the following code:
<type id="Contact"
- Add code to the Contact object that defines a map between the Siebel Server and Siebel CRM Desktop.
For more information, see Code That Creates a Map Between the Siebel Server and Siebel CRM Desktop.
- Add code that creates a map for the picklist between the Siebel Server and Siebel CRM Desktop for the child Account Contacts object:
- Choose the code from the contact object that you use to map the child account object.
For more information, see Mapping Child Objects for a Custom Picklist.
- Copy this code to the clipboard.
- Locate the Account Contacts child object. Search the Ln_siebel_basic_mapping.xml file for the following code:
type id="Account.Contact.Association"
- Locate the Contact field. Search in the Account.Contact.Association object for the following text:
field id="ContactId"
- Locate the matching ContactId. Search the ContactId field for the following text:
user_field id="sbl Contact ID"
- Paste the contact fields that you copied to the clipboard in Step a into the following user field:
sbl Contact ID
For more information, see Mapping Child Objects for a Custom Picklist.
- Map the Preferred Communications field. You add the following code immediately after the code you pasted in Step f:
<field from="Preferred Communications" to="ContactPreferred Communications"></field>
- Repeat Step 7 for the opportunity child object.
Specifying Attributes of the Pick List Element
If you specify a pick list element in the siebel_meta_info.xml file, then the TypeId attribute and the SrcObjectTypeId attribute of this element must match the value in the PicklistTypeId attribute. For example, assume you add the following field: <field Name='Note Type' Label='#fld_account_account_note@note_type' DataType='DTYPE_TEXT' HasPicklist='yes' PicklistIsStatic='yes' PicklistTypeId='AccountNoteType' IOElemName='NoteType' />
In this example, you must set the TypeId attribute in the pick list element to AccountNoteType. Table 15 describes values to use in the pick list element for a Siebel LOV. If you do not use a Siebel LOV, then adjust these values so they match the field names on the integration component field.
Table 15. Values to Use in the Picklist Element for a Siebel LOV
|
|
CollectionTypeFldName |
Type |
ValueFldName |
Value |
LangFldName |
Language |
To add more filters, you can use the master_filter_expr attribute. This attribute typically must match the value in the Search Specification property of the object definition for the pick list in Siebel Tools. In the example on Step 3, the master_filter_expr attribute constrains the values to the correct LOV Type. Code That Creates a New Object Type for the Pick List
To create a new object type for the pick list, you must use the following format for the type id attribute: <type id="object_namefield_namePicklist" predefined_folder="1">
where:
- object_name is the name of the object type in the siebel_meta_info.xml file.
- field_name is the name of the field that resides in the object you define in the object_name.
For example: <type id="ContactPreferred CommunicationsPicklist" >
To create a new object type for a picklist, add the following code to the Ln_siebel_basic_mapping.xml file: <type id="ContactPreferred CommunicationsPicklist"> <field id="Label"> <reader> <lotus_std> <lotus_field id="picklistLabel" /> <convertor> <string /> </convertor> </lotus_std> </reader> <writer> <lotus_std> <lotus_field id="picklistLabel" /> <convertor> <string /> </convertor> < /lotus_std> </writer> </field> <field id="Value"> <reader> <lotus_std> <lotus_field id="picklistValue" /> <convertor> <string /> </convertor> </lotus_std> </reader> <writer> <lotus_std> <lotus_field id="picklistValue" /> <convertor> <string /> </convertor> </lotus_std> </writer> </field> <field id="SortOrder"> <reader> <lotus_std> <lotus_field id="SortOrder" /> <convertor> <integer /> </convertor> </lotus_std> </reader> <writer> <lotus_std> <lotus_field id="SortOrder" /> <convertor> <integer /> </convertor> </lotus_std> </writer> </field> <field id="IsDefault"> <reader> <lotus_std> <lotus_field id="IsDefault" /> <convertor> <bool /> </convertor> </lotus_std> </reader> <writer> <lotus_std> <lotus_field id="IsDefault" /> <convertor> <bool /> </convertor> </lotus_std> </writer> </field> </type>
Code That Creates a Map Between the Siebel Server and Siebel CRM Desktop
To create a map between the Siebel Server and Siebel CRM Desktop, you add the following code to the Contact object of the Ln_siebel_basic_mapping.xml file: <field id="Preferred Communications"> <reader> <lotus_std> <lotus_field id="PreferredCommunications"> </lotus_field> <convertor> <string /> </convertor> </lotus_std> </reader> <writer> <lotus_std> <lotus_field id="PreferredCommunications"> </lotus_field> <convertor> <string /> </convertor> </lotus_std> </writer>| </field>
Mapping Child Objects for a Custom Picklist
It is recommended that you do not map a child object directly in the child object. Instead, you can copy values from the parent object and then paste them into the child object. This technique provides the following advantages:
- Allows Siebel CRM Desktop to copy values on the contact to the child object, such as the account or opportunity.
- If the user changes the value in a contact, then CRM Desktop automatically updates the child objects.
Example Code That Maps Child Objects for a Custom Picklist
Figure 12 illustrates the example code you use to map a child object for a custom picklist.
Figure 12. Example Code That Maps Child Objects for a Custom Picklist
|
Explanation of Callouts The example code to map a child object for a custom picklist includes the following items:
- The following attribute identifies the account child object of the parent contact:
type id="Account.Contact.Association"
- The following tag identifies the Contact field in the account object:
field id="ContactId"ver="1"
- The following attribute identifies the matching ContactId:
lotus_field id="CRMRightId"/
- You copy these fields from the parent contact object and then paste them into the account child object.
- You add the Preferred Communications field to allow you to add it to Account Contact forms. You create this field in Code That Creates a Map Between the Siebel Server and Siebel CRM Desktop.
|