Modifying the Basic Mapping and Forms to Support Hierarchical Picklists
This task is a step in Process of Creating Hierarchical Picklists.
In this topic you modify the basic mapping and forms to support a hierarchical picklist.
To modify the basic mapping and forms to support a hierarchical picklist
Add the parent field to the basic mapping. Do Adding Fields to the Basic Mapping to Support Static Picklists, but use the following code:
<field id="JVD Hier Parent"> <reader> <mapi_user> <user_field id="sbl JVD Hier Parent" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </mapi_user> </reader> <writer> <Outlook_user> <user_field id="sbl JVD Hier Parent" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </Outlook_user> </writer> </field>
Add the child field to the basic mapping. Do Adding Fields to the Basic Mapping to Support Static Picklists, but use the following code:
<field id="JVD Hier Child"> <reader> <mapi_user> <user_field id="sbl JVD Hier Child" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </mapi_user> </reader> <writer> <Outlook_user> <user_field id="sbl JVD Hier Child" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </Outlook_user> </writer> </field>
Create the type that stores the list of values for the parent picklist. Do Modifying the Basic Mapping to Store Values for Static Picklists, but use the following code:
<type id="OpportunityJVD Hier ParentPicklist" predefined_folder="1" ver="1"> <form message_class="IPM.Contact.SBL.OpportunityJVD_Hier_ParentPicklist"></ form>
Bold text identifies the code that is different for a hierarchical picklist. For more information about doing this step, see Modifying the Basic Mapping to Store Values for Static Picklists.
Create the type that stores the list of values for the child picklist. Do Modifying the Basic Mapping to Store Values for Static Picklists, but use the following code:
<type id="OpportunityJVD Hier ChildPicklist" predefined_folder="1" ver="1"> <form message_class="IPM.Contact.SBL.OpportunityJVD_Hier_ChildPicklist"></form>
Bold text identifies the code that is different for a hierarchical picklist. For more information about doing this step, see Modifying the Basic Mapping to Store Values for Static Picklists.
Allow the child picklist to store the value from the parent field. You add the following code to the OpportunityJVD Hier ChildPicklist type that you created in the previous step:
<field id="Parent"> <reader> <mapi_user> <user_field id="sbl Parent" ol_field_type="1"></user_field>| <convertor> <string/> </convertor> </mapi_user> </reader> <writer> <Outlook_user> <user_field id="sbl Parent" ol_field_type="1"></user_field> <convertor> <string/> </convertor> </Outlook_user> </writer> </field>
Add the parent field to the Opportunity form. Do Modifying the Form to Support Static Picklists, but use the following code:
<combobox id="jvd_hier_parent"> <field>JVD Hier Parent</field> <source type="OpportunityJVD Hier ParentPicklist" field="Value" format=":[:(Label):]"></source> </combobox>
Bold text identifies the code that is different for a hierarchical picklist. For more information, see Combobox Control of the Forms File.
Add the child field to the Opportunity form. Do Modifying the Form to Support Static Picklists, but use the following code:
<combobox id="jvd_hier_child"> <field>JVD Hier Child</field> <source type="OpportunityJVD Hier ChildPicklist" field="Value" format=":[:(Label):]"></source> </combobox>
Bold text identifies the code that is different for a hierarchical picklist.