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:
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
Identify the field that Siebel CRM associates with the MVG you must add:
Open Siebel Call Center.
Navigate to the Opportunities list and then click the link in the Opportunity Name field of an opportunity.
Click the More Info tab.
Locate the More Info field.
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.
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.
In Siebel Tools, in the Object Explorer, click Applet.
In the Applets list, query the Name property for Opportunity Form Applet - Child Big.
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.
In the Applet Web Template editor, click the More Info control.
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.
Identify the MVG link.
In the Object Explorer, click Business Component.
In the Business Components list, query the Name property for Opportunity.
In the Object Explorer, expand the Business Component tree and then click Field.
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
In the Object Explorer, click Multi Value Link.
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.
Note the values for the following properties.
Property Value Destination Link
Opportunity/Channel Partner
Primary Id Field
Primary Partner Id
In the Object Explorer, click Link.
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:
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
In Siebel Tools, choose the File Menu and then click New Object.
Click the EAI tab, click Integration Object and then click OK.
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
Choose values for the following items and then click Next.
Property Value Source Object
Channel Partner
Source Root
Channel Partner
Integration Object Name
CRMDesktopChannelPartnerIO
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.
Click Next and then click Finish.
Examine the properties of the integration object you created in Step 6:
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.
In the Object Explorer, expand the Integration Object tree and then click Integration Object Component.
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
In Siebel Tools, display the object type named Integration Object.
For more information, see Displaying Object Types in Siebel Tools.
In the Object Explorer, click Integration Object.
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.
In the Object Explorer, expand the Integration Object tree and then click Integration Component.
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
In the Object Explorer, expand the Integration Component tree and then click Integration Component Field.
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
In the Object Explorer, click Integration Component Key.
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
In the Object Explorer, click Integration Component User Prop.
In the Integration Component User Props list, add new records with the following values.
Name Value MVGAssociation
Y
MVGLink
Channel Partner
Compile your changes.
For more information, see Using Siebel Tools.
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
In the Object Explorer, click Integration Object.
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.
In the Object Explorer, expand the Integration Object tree and then click Integration Component.
In the Integration Components list, query the Name property for Opportunity.
In the Object Explorer, expand the Integration Components tree and then click Integration Component Field.
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
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:
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
Make sure the object you must add is available.
For more information, see Creating an Integration Object for the Channel Partner MVG.
Add a custom object type. You modify the siebel_meta_info.xml file.
For more information, see Code That Adds a Custom Object Type.
Map objects. You modify the Ln_siebel_basic_mapping.xml file.
For more information, see Code That Maps a Custom Object.
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 MVG Link
This task is a step in Process of Modifying the Customization Package to Add an MVG.
In this topic, you add the MVG link to the business logic file.
To add the MVG link
Use a Domino Designer to open the SBL.BusinessLogic script library.
For more information, see Files in the Customization Package .
Locate the following function:
CreateMetaScheme
Add the code to add a new association.
For more information, see Code That Adds a New Association.
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
Add the primary field. You do the following:
Use an XML editor open the siebel_meta_info.xml file.
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' />
Save and then close the siebel_meta_info.xml file.
Use an XML editor to open the Ln_siebel_basic_mapping.xml file:
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>
Save and then close the Ln_siebel_basic_mapping.xml file.
Add the link:
Use an XML editor open the Ln_connector_configuration.xml file.
Add the following code to the Opportunity type tag:
<link>Primary Partner Id</link>
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
Use an XML editor to open the Ln_siebel_basic_mapping.xml file.
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>
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
Use an XML editor open the Ln_package_res.xml file.
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>
Add the same code that you added in Step 2 to the Messages section.
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
Publish your changes.
For more information, see Using the Windows Registry to Control Siebel CRM Desktop.
Test your changes:
Open the client and then navigate to the Opportunity form.
Verify that the form includes an MVG for the Lead Partner Name field.
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
Enter letters in the Enter Value to Find Record window.
Verify that Siebel CRM Desktop automatically displays records in accordance with the letters you enter.
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. |