Adding a Label, a Button, and a Selector Control

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

In this topic, you add a label, a button, and a selector control.

To add a label, a button, and a selector control

  1. Use an XML editor to open the forms_xx.xml file.

  2. Add a label for the MVG:

    1. Locate the following section:

      right side captions
      
    2. Insert the following code immediately under the code that defines the Probability label:

      <cell size="22">
        <static id="0x20014" tab_order="166">
          <text>#lbl_channel_partner</text>
        </static>
      </cell>
      
  3. Add the button and primary selector control:

    1. Locate the following section:
      right side fields
      
    2. Add the following code immediately under the code that defines the Probability control:

      <cell size="22">
        <stack layout="horz">
          <cell>
            <mvg_primary_selector id="channel_partner_mvg">
              <source type="Opportunity.Channel_Partner.Association" 
      left_id="OpportunityId" item_value="ChannelPartnerId" 
      display_format=":[:(PartnerName):]"></source>
              <field>Primary Partner Id</field>
            </mvg_primary_selector>
      |    </cell>
             <cell size="5">
          </cell>cell size="22">
            <button id="btn_mvgChannelPartner">
              <text>...</text>
            </button>
          </cell>
        </stack>
      </cell>
      

      Make sure you specify the Id for the button and the Id for the primary selector in the same way that you specified them in the script.

  4. Increase the size of the cell that contains the label, the button, and the selector control:

    1. Locate the following section:
      Category bar
      
    2. Locate the fifth cell that is included in the Category bar section.

    3. Change the code of the fifth cell to the following code:

      <cell size="153">
      
  5. Save and then close the forms_xx.xml file.