11Customizing Multi-Value Groups

Customizing Multi-Value Groups

This chapter describes how to customize multi-value groups. It includes the following topics:

Process of Creating MVG Fields

This topic describes how to create an MVG (multi-value group) field. You do the following work to add an MVG field:

  1. Identifying Predefined MVG Objects in Siebel CRM

  2. Process of Making Siebel CRM Data Available to Add an MVG

  3. Process of Modifying the Customization Package to Add an MVG

  4. Publishing and Testing a Custom MVG Field

An MVG field displays an association with other objects. This association can be a many to many association, or a many to one association. The user can use an MVG field to do the following:

  • Add or remove an association

  • Change a primary association

  • Browse existing associations

You can also use an MVG to economize the layout of a form. You can display a set of associated records in a single-line control instead of using the IBM Notes_view control.

The example in this topic adds an MVG control to the Opportunity form. This MVG displays an association between an opportunity and channel partners.

For more information about MVGs, see Configuring Siebel Business Applications.

    Identifying Predefined MVG Objects in Siebel CRM

    This task is a step in Process of Creating MVG Fields.

    In this topic, you identify the MVG objects that you use to add an MVG field for this example. These objects come predefined with Siebel CRM.

    To identify predefined MVG objects in Siebel CRM

    1. Identify the field that Siebel CRM associates with the MVG you must add:

      1. Open Siebel Call Center.

      2. Navigate to the Opportunities list and then click the link in the Opportunity Name field of an opportunity.

      3. Click the More Info tab.

      4. Locate the More Info field.

      5. Choose the Help menu and then click About View.

        The About View dialog box lists the applets in the order in that Siebel Call Center displays them.

      6. Note the applet name that Siebel Call Center uses to display the More Info field.

        In this example, this is the Contact Form Applet - Child applet.

      7. In Siebel Tools, in the Object Explorer, click Applet.

      8. In the Applets list, query the Name property for Opportunity Form Applet - Child Big.

      9. Right-click the Opportunity Form Applet - Child Big applet and then choose Edit Web Layout.

        If Siebel Tools displays the Read-only Object dialog box, then you must check out the project. For more information, see Checking Out Projects in Siebel Tools.

      10. In the Applet Web Template editor, click the More Info control.

      11. In the Properties window, note the values for the following properties.

        Property Value

        Field

        Mail Stop

        MVG Applet

        Partner Lead Name Mvg Applet

        In this example, Siebel CRM associates the Partner field with the Lead Partner MVG.

    2. Identify the MVG link.

      1. In the Object Explorer, click Business Component.

      2. In the Business Components list, query the Name property for Opportunity.

      3. In the Object Explorer, expand the Business Component tree and then click Field.

      4. In the Fields list, query the Name property for Partner and then note the values for the following properties.

        Property Value

        Multi Valued

        TRUE

        Multi Valued Link

        Channel Partner

      5. In the Object Explorer, click Multi Value Link.

      6. In the Multi Value Links list, query the Name property for the Multi Valued Link that the field references that you noted in Step d. In this example, this link is Channel Partner.

      7. Note the values for the following properties.

        Property Value

        Destination Link

        Opportunity/Channel Partner

        Primary Id Field

        Primary Partner Id

      8. In the Object Explorer, click Link.

      9. In the Links list, query the Name property for the Destination Link that you noted in Step g.

        In this example, this link is Opportunity/Channel Partner. Note the values for the properties described in the following table.

        Property Value

        Inter Table

        S_OPTY_ORG

        If the Inter Table property:

        • Contains an intersection table, then the link maintains a many to many association.

        • Is empty, then the link maintains a one to many association.

        Child Business Component

        Channel Partner

        The business component in the Child Business Component property must be displayed.

        To identify the required business component, you can also examine the Business Component property of the Partner Lead Name MVG Applet.

      Process of Making Siebel CRM Data Available to Add an MVG

      This task is a step in Process of Creating MVG Fields.

      To make Siebel CRM data available to add an MVG, you do the following:

      1. Creating an Integration Object for the Channel Partner MVG

      2. Creating an Integration Component for the Channel Partner MVG

      3. Extending an Integration Object for the Primary Id Field

      This topic describes how to make sure Siebel CRM data available to Siebel CRM Desktop. Some Siebel CRM data is available without customizing Siebel CRM Desktop, such as opportunities, accounts, and contacts. Other Siebel CRM data is not available. For example, if your implementation requires Channel Partner data, then you must configure integration objects to make this data available to Siebel CRM Desktop.

        Creating an Integration Object for the Channel Partner MVG

        This task is a step in Process of Making Siebel CRM Data Available to Add an MVG.

        In this topic, you create a new integration object that makes the channel partner data available to the EAI Siebel Adapter. The work you do in this topic allows the PIM Client Sync Service business service to access channel partner data. For more information, see Siebel Enterprise Components That Siebel CRM Desktop Uses.

        To create an integration object for the channel partner MVG
        1. In Siebel Tools, choose the File Menu and then click New Object.

        2. Click the EAI tab, click Integration Object and then click OK.

        3. In the Integration Object Builder Dialog box, choose values for the following items and then click Next.

          Property Value

          Project

          Choose a project.

          It is recommended that you create a separate project for any customizations you make to Siebel CRM Desktop. For example, use a project named Siebel CRM Desktop.

          Business Service

          EAI Siebel Wizard

        4. Choose values for the following items and then click Next.

          Property Value

          Source Object

          Channel Partner

          Source Root

          Channel Partner

          Integration Object Name

          CRMDesktopChannelPartnerIO

        5. Expand the Channel Partner tree, choose the integration components you must include with this integration object, and then click Next.

          As the default, Siebel Tools includes a check mark for each integration component. For this example, accept the default.

        6. Click Next and then click Finish.

        7. Examine the properties of the integration object you created in Step 6:

          1. In the Object Explorer, click Integration Object, query the Name property for CRMDesktopChannelPartnerIO, and then note the following property.

            Property Value

            External Name

            Channel Partner

            You will use this property as a value for the IntObjName attribute.

          2. In the Object Explorer, expand the Integration Object tree and then click Integration Object Component.

          3. In the Integration Object Components list, query the Name property for Channel Partner and then note the following properties.

            Property Value

            XML Tag

            ChannelPartner

            You will use this property as a value for the SiebMsgXmlElemName attribute.

            XML Container Element

            ListOfChannelPartner

            You will use this property as a value for the SiebMsgXmlCollectionElemName attribute.

          Creating an Integration Component for the Channel Partner MVG

          This task is a step in Process of Making Siebel CRM Data Available to Add an MVG.

          In this topic, you add a channel partner integration component as a child of the integration object that Siebel CRM Desktop uses for opportunities. This allows Siebel CRM Desktop to query the channel partners that are associated with the opportunities for a user.

          To create an integration component for the channel partner MVG
          1. In Siebel Tools, display the object type named Integration Object.

            For more information, see Displaying Object Types in Siebel Tools.

          2. In the Object Explorer, click Integration Object.

          3. In the Integration Objects list, query the Name property for CRMDesktopOpportunityIO and then make sure the Object Locked property contains a check mark.

            Siebel CRM Desktop adds the CRMDesktopOpportunityIO integration object to the repository when you install Siebel CRM Desktop on the Siebel Server. You must install it before you can complete this task.

          4. In the Object Explorer, expand the Integration Object tree and then click Integration Component.

          5. In the Integration Components list, add a new record with the following values.

            Property Value

            Business Component

            Channel Partner

            Name

            Opportunity_ChannelPartner

            External Name

            Channel Partner

            External Sequence

            2

            For more information, see Requirements for the Sequence Property.

            XML Sequence

            10002

            For more information, see Requirements for the Sequence Property.

            XML Container Element

            ListOfOpportunity_ChannelPartner

            XML Tag

            Opportunity_ChannelPartner

          6. In the Object Explorer, expand the Integration Component tree and then click Integration Component Field.

          7. In the Integration Component Fields list, add new records with the following values.

            Name Data Type Length

            IsPrimaryMVG

            DTYPE_TEXT

            1

            Location

            DTYPE_TEXT

            50

            Organization BU Name

            DTYPE_TEXT

            50

            Partner

            DTYPE_TEXT

            100

            Partner Id

            DTYPE_Id

            30

            Partner Status

            DTYPE_TEXT

            30

            operation

            DTYPE_TEXT

            30

            searchspec

            DTYPE_TEXT

            250

          8. In the Object Explorer, click Integration Component Key.

          9. In the Integration Component Keys list, add new records with the following values.

            Name Key Sequence Number Key Type

            Modification Key

            1

            Modification Key

            Primary Key

            1

            User Key

            Status Key

            1

            Status Key

          10. In the Object Explorer, click Integration Component User Prop.

          11. In the Integration Component User Props list, add new records with the following values.

            Name Value

            MVGAssociation

            Y

            MVGLink

            Channel Partner

          12. Compile your changes.

            For more information, see Using Siebel Tools.

          13. In the Object Explorer, click Integration Component and then note the following properties of the integration component that you added in Step 5. You use these values when you modify the metadata for the customization package.

            Property Value

            Parent Name

            CRMDesktopOpportunityIO

            You will use this property as a value for the IntObjName attribute.

            XML Tag

            Opportunity_ChannelPartner

            You will use this property as a value for the SiebMsgXmlElemName attribute.

            XML Container Element

            ListOfOpportunity_ChannelPartner

            You will use this property as a value for the SiebMsgXmlCollectionElemName attribute.

            Extending an Integration Object for the Primary Id Field

            This task is a step in Process of Making Siebel CRM Data Available to Add an MVG.

            In this topic, you make the Primary Id field available to Siebel CRM Desktop. You make the primary on the opportunity available so that Siebel CRM Desktop can identify the record to display in the opportunity form if the opportunity includes more than one channel partner.

            In this example, the Primary Id Field property of the MVG link contains a value. If this property were empty, then you would skip this topic and proceed to Step 1 in the topic Process of Modifying the Customization Package to Add an MVG.

            To extend an integration object for the Primary Id field
            1. In the Object Explorer, click Integration Object.

            2. In the Integration Objects list, query the Name property for CRMDesktopChannelPartnerIO, and then make sure the Object Locked property contains a check mark.

              You created the CRMDesktopChannelPartnerIO integration object in Step 6 in the topic Creating an Integration Object for the Channel Partner MVG.

            3. In the Object Explorer, expand the Integration Object tree and then click Integration Component.

            4. In the Integration Components list, query the Name property for Opportunity.

            5. In the Object Explorer, expand the Integration Components tree and then click Integration Component Field.

            6. In the Integration Component Fields list, add a new record with the following values.

              Property Value

              Name

              Primary Partner Id

              External Name

              Primary Partner Id

              Length

              15

              Data Type

              DTYPE_ID

              External Data Type

              DTYPE_ID

              External Sequence

              139

              For more information, see Requirements for the Sequence Property.

              XML Sequence

              139

              For more information, see Requirements for the Sequence Property.

              XML Tag

              PrimaryPartnerId

            7. Compile your changes.

              For more information, see Using Siebel Tools.

              Process of Modifying the Customization Package to Add an MVG

              This task is a step in Process of Creating MVG Fields.

              To modify the customization package to add an MVG, you do the following:

              1. Adding a Custom Object

              2. Adding the MVG Link

              3. Adding the Primary Field

              4. Adding a Field

              5. Customizing the Validation Message and Labels

                Adding a Custom Object

                This task is a step in Process of Modifying the Customization Package to Add an MVG.

                To add a custom object to Siebel CRM Desktop, you display the object in Siebel CRM and then modify customization package XML files. The example in this topic makes available and then adds the Channel Partner object.

                To add a custom object
                1. Make sure the object you must add is available.

                  For more information, see Creating an Integration Object for the Channel Partner MVG.

                2. Add a custom object type. You modify the siebel_meta_info.xml file.

                  For more information, see Code That Adds a Custom Object Type.

                3. Map objects. You modify the Ln_siebel_basic_mapping.xml file.

                  For more information, see Code That Maps a Custom Object.

                4. Configure synchronization for the custom object. You modify the Ln_connector_configuration.xml file.

                For more information, see Code That Configures Synchronization for a Custom Object.

                  Adding the Primary Field

                  This task is a step in Process of Modifying the Customization Package to Add an MVG.

                  In this topic, you add the primary field to the customization package. This field displays in the MVG dialog box that you add for this example.

                  To add the primary field
                  1. Add the primary field. You do the following:

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

                    2. Add the following code to the Opportunity object:

                      <field Name='Primary Partner Id' Label='Primary Partner Id' 
                      DataType='DTYPE_ID' IsFilterable='no' IsRefObjId='yes' 
                      RefObjTypeId='ChannelPartner' IOElemName='PrimaryPartnerId' />
                      
                    3. Save and then close the siebel_meta_info.xml file.

                    4. Use an XML editor to open the Ln_siebel_basic_mapping.xml file:

                    5. Add the following code to the Opportunity type tag:

                      <field id="Primary Partner Id">
                          <reader>
                            <lotus_std>
                              <lotus_field id="PrimaryPartnerId" />
                                <convertor>
                                  <binary_hexstring />
                                </convertor>
                            </lotus_std>
                          </reader>
                          <writer>
                            <lotus_std>
                              <lotus_field id="PrimaryPartnerId" />
                                <convertor>
                                  <binary_hexstring />
                                </convertor>
                            </lotus_std>
                          </writer>
                      </field>
                      
                    6. Save and then close the Ln_siebel_basic_mapping.xml file.

                  2. Add the link:

                    1. Use an XML editor open the Ln_connector_configuration.xml file.

                    2. Add the following code to the Opportunity type tag:

                      <link>Primary Partner Id</link>
                      
                    3. Save and then close the Ln_connector_configuration.xml file.

                    Adding a Field

                    This task is a step in Process of Modifying the Customization Package to Add an MVG.

                    This topic describes how to add the ChannelPartnerStatus field.

                    To add a field
                    1. Use an XML editor to open the Ln_siebel_basic_mapping.xml file.

                    2. Add the following code to the Opportunity.Channel_Partner.Association type:

                      <field id="ChannelPartnerStatus">
                        <reader>
                          <lotus_std>
                            <lotus_field id="ChannelPartnerStatus" />
                              <convertor>
                                <string />
                              </convertor>
                          </lotus_std>
                        </reader>
                        <writer>
                          <lotus_std>
                            <lotus_field id="ChannelPartnerStatus" />
                              <convertor>
                                <string />
                              </convertor>
                          </lotus_std>
                        </writer>
                      </field>
                      
                    3. Save and then close the Ln_siebel_basic_mapping.xml file.

                      Customizing the Validation Message and Labels

                      This task is a step in Process of Modifying the Customization Package to Add an MVG.

                      In this topic, you customize the validation message and a label for the dialog box and forms.

                      To customize the validation message and labels
                      1. Use an XML editor open the Ln_package_res.xml file.

                      2. Add the following code to the Script section:

                        <str key="msg_channel_partner_present">This channel partner is already present in 
                        the list.</str> <str key="msg_channel_partner_is_primary">This channel partner is 
                        primary. The primary record cannot be removed. To remove this record, make another 
                        record primary first.</str> <str key="msg_channel_partner_add_caption">Add 
                        channel partner.</str><str key="lbl_channel_partner">Lead Partner Name</str>
                        
                      3. Add the same code that you added in Step 2 to the Messages section.

                      4. Close and then save the Ln_package_res.xml file.

                      The following code specifies the values for labels you use in the dialog box and form layouts:

                      <str key="lbl_channel_partner">Lead Partner Name</str>
                      

                        Publishing and Testing a Custom MVG Field

                        This task is a step in Process of Creating MVG Fields.

                        In this topic, you publish and test your customization.

                        To publish and test a custom MVG field

                        1. Publish your changes.

                          For more information, see Using the Windows Registry to Control Siebel CRM Desktop.

                        2. Test your changes:

                          1. Open the client and then navigate to the Opportunity form.

                          2. Verify that the form includes an MVG for the Lead Partner Name field.

                          3. Click the MVG that Siebel CRM Desktop displays next to the Lead Partner Name field, and then verify that Siebel CRM Desktop does the following:

                            • Displays the Channel Partners MVG dialog box

                            • Displays the list of partners in the Associated Channel Partners window of the dialog box

                            • Includes a partner record in the Primary window

                          4. Enter letters in the Enter Value to Find Record window.

                          5. Verify that Siebel CRM Desktop automatically displays records in accordance with the letters you enter.

                          6. Verify the salesbook control. You click the Salesbook icon and then verify that Siebel CRM Desktop displays the SalesBook dialog box, and that this dialog box displays a list of channel partners.

                          Example Code You Use to Add an MVG

                          This topic describes some of the code you use to add an MVG in this example. It includes the following topics:

                            Code That Adds a Custom Object Type

                            To add a custom object type, you add the following code anywhere in the siebel_meta_info.xml file. To assist with debugging, it is recommended that you place this code after the last Type definition:

                            <object TypeId='ChannelPartner' Label='Channel Partner' LabelPlural='Channel 
                            Partners' EnableGetIDsBatching='true' ViewMode='Sales Rep' IntObjName='Channel 
                            Partner' SiebMsgXmlElemName='ChannelPartner' 
                            SiebMsgXmlCollectionElemName='ListOfChannelPartner' >
                            
                            <field Name='DS Updated' Label='DS Updated' DataType='DTYPE_DATETIME' 
                            IsFilterable='no' IsHidden='yes' IOElemName='DSUpdated' />
                            
                            <field Name='Id' Label='Id' IsPrimaryKey='yes' DataType='DTYPE_ID' 
                            IsFilterable='no' IsHidden='yes' IOElemName='Id'/>
                            
                            <field Name='Name' Label='Name' DataType='DTYPE_TEXT' IsPartOfUserKey='yes' 
                            IOElemName='Name' />
                            
                            <field Name='Location' Label='Location' DataType='DTYPE_TEXT' IsPartOfUserKey='yes' 
                            IOElemName='Location'/>
                            
                            </object>
                            

                            This code does the following:

                            • Uses properties of the integration object and integration component as the values for attributes.

                            • References only a few of the many fields that exist in the Channel Partner object in Siebel CRM.

                            • Uses the Name and Location fields as parts of the user key. You define the natural key in the Ln_connector_configuration.xml file.

                              Code That Maps a Custom Object

                              You can map a field of a Siebel CRM object to the IBM Notes field or to a custom Siebel CRM Desktop field. For example, you can do the following:

                              • Map the Name field in Siebel CRM to the LastName field in IBM Notes

                              • Map the mapLocation field in IBM Notes to the Location field in Siebel CRM

                              To map objects, you add the following code to the Ln_siebel_basic_mapping.xml file:

                              <type id="ChannelPartner">
                                <field id="Name">
                                  <reader>
                                    <lotus_std>
                                      <lotus_field id="Name" />
                                        <convertor>
                                          <string />
                                        </convertor>
                                    </lotus_std>
                                  </reader>
                                  <writer>
                                    <lotus_std>
                                      <lotus_field id="LastName" />
                                        <convertor>
                                          <string />
                                        </convertor>
                                    </lotus_std>
                                  </writer>
                                </field>
                                <field id="Location">
                                  <reader>
                                    <lotus_std>
                                      <lotus_field id="Location" />
                                        <convertor>
                                          <string />
                                        </convertor>
                                    </lotus_std>
                                  </reader>
                                  <writer>
                                    <lotus_std>
                                      <lotus_field id="Location" />
                                        <convertor>
                                          <string />
                                        </convertor>
                                    </lotus_std>
                                  </writer>
                                  </field>
                              </type>
                              

                              Note the following requirements:

                              • The value for the type id tag in the Ln_siebel_basic_mapping.xml file must equal the value in the TypeId object in the siebel_meta_info.xml file.

                              • If you define a new type, then you must include the form tag. The value for the form tag must equal the form alias. This example does not require a form, so the form tag is empty.

                                Code That Configures Synchronization for a Custom Object

                                To configure synchronization for a custom object, you add the following code to the Ln_connector_configuration.xml file:

                                <type id="ChannelPartner">
                                  <view label="Channel Partner" label_plural="Channel Partners" 
                                small_icon="type_image:Account:16" normal_icon="type_image:Account:24" 
                                large_icon="type_image:Account:48">
                                  </view>
                                    <synchronizer name_format=":[:(Name):]">
                                  <links>
                                  </links>
                                  <natural_keys>
                                    <natural_key>
                                      <field>Name</field>
                                      <field>Location</field>
                                    </natural_key>
                                  </natural_keys>
                                  </synchronizer>
                                </type>
                                

                                Note the following:

                                • The value in the type id tag must equal the value in the TypeId object in the meta_info.xml file.

                                • The natural_key tag includes the Name and Location fields as part of the user key.

                                  Code That Adds a New Association

                                  To add a new association, you add the following code to the CreateMetaScheme function in the SBL.BusinessLogic script library:

                                  Call Helper.AddMVGLink("Opportunity", "ChannelPartner", _
                                  Opportunity.Channel_Partner.Association", _
                                  CRMDLeftId", "CRMDRightId", _
                                  CRMDLeftStatus", "CRMDRightStatus", _
                                  LINK_TAG_MVG, _
                                  "PrimaryPartnerId", "")
                                  

                                  The following table describes the important attributes you can use with the AddMVGLink function.

                                  Attribute Description

                                  left_type

                                  The type of the first linked object. For example, Opportunity.

                                  right_type

                                  The type of the second linked object. For example, Channel Partner.

                                  associationType

                                  The Id of the association type described in the siebel_meta_info.xml file and the Ln_siebel_basic_mapping.xml file.

                                  leftIdField

                                  The field of the association object that contains the ID of the left (first) object.

                                  rightIdField

                                  The field of the association object that contains the ID of the right (second) object.

                                  leftStatusField

                                  The field of the association that contains the status of the left (first) object.

                                  rightStatusField

                                  The field of the association that contains the status of the right (second) object.

                                  tag

                                  The tag name of the link.

                                  leftObjPrimaryField

                                  The field of the left (first) object that contains the status of the right (second) object. The field can contain an empty value.

                                  rightObjPrimaryField

                                  The field of the right (second) object which contains the primary ID for the left (first) object. The field can contain an empty value.