Siebel CRM Desktop for Microsoft Outlook Administration Guide > Customizing Siebel CRM Desktop > Process of Adding a Predefined Siebel Picklist to Siebel CRM Desktop >

Adding a Field to the Customization Package


This task is a step in Process of Adding a Predefined Siebel Picklist to Siebel CRM Desktop.

In this topic you add a field to the customization package.

To add a field to the customization package

  1. Create a working set of files for the customization package:
    1. Open a DOS command prompt, and then navigate to the directory that contains the current files of the customization package.

      For more information, see About Files in the Customization Package.

    2. Create a copy of the current set of customization package files.
    3. 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.

    4. To create a working set of customization package files, 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_12.xml to v02_forms_12.xml. It is recommended that you use this technique to indicate that you have modified the customization package.

  2. Verify that Siebel Tools added the integration object:

    Use an XML editor to open the siebel_meta_info.xml file.

    For more information, see About Files in the Customization Package.

    1. To locate the PickList_Preferred_Communications object, search for the following code:

    <object TypeId="PickList_Preferred_Communications"

    1. In the header of the PickList_Preferred_Communications object, make sure the following attributes exist and with the correct value.
      Attribute
      Value

      IntObjName

      CRMDesktopPreferredCommPickList

      SiebMsgXmlElemName

      PicklistHierarchicalSub-Area

      SiebMsgXmlCollectionElemName

      ListOfCrmdesktoppreferredcommpicklist

  3. To define the picklist, 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 Defining Attributes of the Pick List Element.

  4. Add the Preferred Communications field to the Contact object:
    1. To locate the Contact object, search for the following code:

    object TypeID='Contact'

    1. 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" />

  5. Repeat Step 4 for each of the following objects:
    • Account.Contact
    • Opportunity.Contact

      In this example, these objects in the siebel_meta_info.xml file must include the Preferred Communications field. You must add this field to each object.

  6. Add code that creates a map for the pick list between the Siebel Server and Siebel CRM Desktop for the parent Contact object:
    1. Use an XML editor to open the siebel_basic_mapping.xml file.
    2. Create a new object type for the pick list.

      For more information, see Code to Create a New Object Type for the Pick List

    3. To locate the parent object, search the siebel_basic_mapping.xml file for the following code:

    <type id="Contact"

    1. Add code to the Contact object that defines a map between the Siebel Server and Siebel CRM Desktop.

      For more information, see Code to Define a Map Between the Siebel Server and Siebel CRM Desktop.

  7. Add code that creates a map for the pick list between the Siebel Server and Siebel CRM Desktop for the child Account Contacts object:
    1. 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.

    2. Copy this code to the clipboard.
    3. To locate the Account Contacts child object, search the siebel_basic_mapping.xml file for the following code:

    type id="Account.Contact.Association"

    1. To locate the Contact field, search in the Account.Contact.Association object for the following text:

    field id="ContactId"

    1. To locate the matching ContactId, search the ContactId field for the following text:

    user_field id="sbl Contact ID"

    1. 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.

    1. To map the Preferred Communications field, add the following code immediately after the code you pasted in Step f:

    <field from="Preferred Communications" to="ContactPreferred Communications"></field>

  8. Repeat Step 7 for the opportunity child object.

Defining Attributes of the Pick List Element

If you define 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 19 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 19. Values to Use in the Picklist Element for a Siebel LOV
Attribute
Value

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 to Create 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" predefined_folder="1">

To create a new object type for a pick list, add the following code to the siebel_basic_mapping.xml file:

<type id="ContactPreferred CommunicationsPicklist" predefined_folder="1">

<form message_class="IPM.Contact.SBL.ContactPreferred CommunicationsPicklist"></form>

<field id="Label">

<reader>

<mapi_user><user_field id="sbl picklistLabel" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</mapi_user>

</reader>

<writer>

<outlook_user><user_field id="sbl picklistLabel" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</outlook_user>

</writer>

</field>

<field id="Value">

<reader>

<mapi_user><user_field id="sbl picklistValue" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</mapi_user>

</reader>

<writer>

<outlook_user><user_field id="sbl picklistValue" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</outlook_user>

</writer>

</field>

<field id="SortOrder">

<reader>

<mapi_user><user_field id="sbl SortOrder" ol_field_type="3"></user_field>

<convertor><integer/></convertor>

</mapi_user>

</reader>

<writer>

<outlook_user><user_field id="sbl SortOrder" ol_field_type="3"></user_field>

<convertor><integer/></convertor>

</outlook_user>

</writer>

</field>

<field id="IsDefault">

<reader>

<mapi_user><user_field id="sbl IsDefault" ol_field_type="6"></user_field>

<convertor><bool/></convertor>

</mapi_user>

</reader>

<writer>

<outlook_user><user_field id="sbl IsDefault" ol_field_type="6"></user_field>

<convertor><bool/></convertor>

</outlook_user>

</writer>

</field>

</type>

Code to Define a Map Between the Siebel Server and Siebel CRM Desktop

To define a map between the Siebel Server and Siebel CRM Desktop, add the following code to the Contact object of the siebel_basic_mapping.xml file:

<field id="Preferred Communications">

<reader>

<mapi_user><user_field id="sbl Preferred Communications" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</mapi_user>

</reader>

<writer>

<outlook_user><user_field id="sbl Preferred Communications" ol_field_type="1"></user_field>

<convertor><string/></convertor>

</outlook_user>

</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 Siebel CRM Desktop automatically updates the child objects.
Example Code to Map Child Objects for a Custom Picklist

Figure 11 illustrates example code to map a child object for a custom picklist.

Figure 11. Example Code to Map Child Objects for a Custom Picklist

The example code to map a child object for a custom picklist includes the following items:

  1. The following attribute identifies the account child object of the parent contact:

    type id="Account.Contact.Association"

  2. The following tag identifies the Contact field in the account object:

    field id="ContactId"

  3. The following attribute identifies the matching ContactId:

    user_field id="sbl Contact ID"

  4. You copy these fields from the parent contact object and then paste them into the account child object.
  5. You add the Preferred Communications field to allow you to add it to Account Contact forms. You define this field in Code to Define a Map Between the Siebel Server and Siebel CRM Desktop.
Siebel CRM Desktop for Microsoft Outlook Administration Guide Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Legal Notices.