6Migrating Picklist Values

Migrating Picklist Values

This chapter describes how to migrate picklist values using the Oracle Migration Tool On Demand client. It contains the following topics:

Picklist Values

Picklist values are those values that you have assigned to a field of the type Picklist in the Oracle CRM On Demand application.

The following table describes the Oracle Migration Tool On Demand client commands used with picklist values. For more information about running these commands, see Migrating Picklist Values.

Table Oracle Migration Tool On Demand Commands for Picklist Values

Command Description

Read Picklist SystemNameOfObject

This command exports a set of picklist values for a specific record type (object).

SystemNameOfObject is the system name of the record type. The system names for the record types are listed in System Names for Record Types.

ReadAll Picklist

This command exports all picklist values separated by the object name.

Upsert Picklist PicklistXML

This command updates or inserts a set of picklist values in a particular object.

Note: Nonadministrative Oracle CRM On Demand users can run the Read and ReadAll commands.

Privileges Required for Migrating Picklist Values

The following privileges are required for the user account running the Oracle Migration Tool On Demand client commands:

  • For the Read and ReadAll commands: Enable Web Services Access.

  • For the Upsert command: Enable Web Services Access, Customize Application, and Manage Object Access for custom objects that have been set up in the company tenant, for example, Customize Application - Manage Custom Object 01, and so on.

    Field management must be supported by the object.

For information about setting and checking privileges, see Oracle CRM On Demand Online Help.

Elements and Sections in the Picklist XML Output File

The following table describes the elements and sections in the picklist XML output file.

Table Elements and Sections in the Picklist XML File

Description Element or Section

<IncludeAll> specifies whether the preconfigured configuration information is returned in addition to the customized configuration information (true), or if only the customized configuration information is returned. The default setting is false.

<data:IncludeAll>true</data:IncludeAll>

<ObjectName> contains the system name of the record type (object), which never changes.

<data:ObjectName>Account Team</data:ObjectName>

The <ListOfPicklists> section contains the details of the picklists fields.

<data:ListOfPicklists>
. . . 
</data:ListOfPicklists> 

The <Picklist> section contains all of the elements for one picklist field.

<data:Picklist>
. . .
</data:Picklist>

<Name> contains the system name of the picklist field within the record type.

<data:Picklist>
 <data:Name>Team Role</data:Name> 
. . .
</data:Picklist>

<WebSvcTag> contains the Web Services v2.0 integration tag name for the field. This element is read-only and is ignored in Upsert operations.

<data:Picklist>
. . .
  <data:WebSvcTag>Team Role</data:WebSvcTag>
. . .
</data:Picklist>

The <ListOfPicklistValues> section contains the details of the picklist field values.

<data:Picklist>
. . .
  <data:ListOfPicklistValues>
. . .
  </data:ListOfPicklistValues>
. . .
</data:Picklist>

The <PicklistValue> section contains the details of one picklist value:

  • <ValueId> is the identifier assigned to the specific picklist value. This element maps to the Id field in the Edit Picklist window for the picklist field.

  • <Disabled> specifies whether the value is disabled (true) or is not disabled (false).

<data:Picklist>  
. . .  
  <data:ListOfPicklistValues>
    <data:PicklistValue>  
      <data:ValueId>Executive Sponsor
      </data:ValueId>
      <data:Disabled>false</data:Disabled> 
 . . .   
     </data:PicklistValue>  
. . .  
  </data:ListOfPicklistValues> 
. . .  
</data:Picklist> 

The <ListOfValueTranslations> section contains the translation values for the picklist value.

<data:Picklist>
. . . 
  <data:ListOfPicklistValues> 
    <data:PicklistValue>
. . .
      <data:ListOfValueTranslations>
. . . 
      </data:ListOfValueTranslations>
. . .
    </data:PicklistValue>
. . .
  </data:ListOfPicklistValues>
. . .
</data:Picklist> 

The <ValueTranslation> section contains the translation values for one language:

  • <LanguageCode> contains the three-letter code for a language. For the list of language codes, see Language Codes and Their Corresponding Language and Country.

  • <Value> contains the picklist value in the language identified by the language code.

  • <Order> specifies the order for the picklist value within the set of picklist values in the specified language.

<data:Picklist>
. . .
  <data:ListOfPicklistValues>
    <data:PicklistValue>
. . .
      <data:ListOfValueTranslations>  
        <data:ValueTranslation>
          <data:LanguageCode>ENU</data:LanguageCode>
          <data:Value>Executive Sponsor
          </data:Value>  
          <data:Order>2</data:Order>
        </data:ValueTranslation>
      </data:ListOfValueTranslations>
. . .
    </data:PicklistValue>
. . .
  </data:ListOfPicklistValues>
. . .
</data:Picklist>

Migrating Picklist Values

The following topics provide examples of how to use the Oracle Migration Tool On Demand client to migrate picklist values:

Note: Back up your configuration data and all other relevant data before running the Oracle Migration Tool On Demand client.

    Extracting All Picklist Values for a Single Object

    This topic describes how to extract all picklist values for a single object from your Oracle CRM On Demand server for your environment (customer test environment or production).

    Syntax

    The following is the syntax for using the Oracle Migration Tool On Demand client to extract all picklist values for an object:

    migrationtool -u UserID -s ServerURL Read Picklist SystemNameOfObject
    

    where:

    • UserID is the user sign-in ID that has the appropriate privileges to run the Oracle Migration Tool On Demand client commands.

    • ServerURL is the URL for the Oracle CRM On Demand server where your company resides.

    • SystemNameOfObject is the system name of the object (record type) for which you want to extract the picklists, for example, Account. The system names for the record types are listed in System Names for Record Types.

    Note: The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (using the pipe command) to the client program from standard input; that is, from a file, from the command line, or from another program.

    Example of Extracting All Picklist Values for a Single Object

    The following is an example of extracting all picklist values for the Account object:

    migrationtool -u UserID -s ServerURL Read Picklist Account
    
    Note: Quotation marks are required only if the object name contains spaces.

      Extracting Picklist Values for a Single Picklist Field

      To extract the picklist values for a single picklist field for an object, complete the steps in the following procedure.

      To extract the picklist values for a single picklist field

      1. Prepare an input XML file as follows:

        <data:PicklistSet xmlns:data="urn:/crmondemand/xml/picklist/query">
          <data:ObjectName>ObjectName</data:ObjectName>
          <data:ListOfPicklists>
            <data:Picklist>
              <data:Name>PickListName</data:Name>
            </data:Picklist>
          </data:ListOfPicklists>
        </data:PicklistSet>
        

        where:

        • ObjectName is the name of the system name of the record type (object), which never changes, for example, Account.

        • PickListName is the system name of the picklist field for which you want to extract the values.

        Note: If you do not know the system name of a customized or custom picklist field, then run the Read FieldManagement command for the record type. In the output file from that command, the <Name> element shows the system name of the field. As an example, PICK_000 is the system name of the first custom picklist field that is created for the Account record type. For more information about the Read FieldManagement command, see Custom Fields.

        If you want to extract only the picklist values that are active (that is, the picklist values that are not marked as disabled), then include the <Disabled> argument in the input XML file for the Read Picklist command and set the value of the argument to false.

      2. Run the Oracle Migration Tool On Demand client as follows:

        migrationtool -u UserID -s ServerURL Read Picklist InputXMLFilePath
        

        For example, if your input XML file is named MyAccountPicklist.xml:

        migrationtool -u UserID -s ServerURL Read Picklist "C:\My Files\MyAccountPicklist.xml"
        

        Extracting All Picklist Values for All Objects

        This topic describes how to extract all picklist values from your Oracle CRM On Demand environment (customer test environment or production).

        Syntax

        The following is the syntax for using the Oracle Migration Tool On Demand client to extract all picklist values for all objects:

        migrationtool -u UserID -s ServerURL ReadAll Picklist 
        

        where:

        • UserID is the user sign-in ID that has the appropriate privileges to run the Oracle Migration Tool On Demand client commands.

        • ServerURL is the URL for the Oracle CRM On Demand server where your company resides.

        Example of Extracting All Picklist Values for All Objects

        The following is an example of extracting all picklist values from your Oracle CRM On Demand server for all objects:

        migrationtool -u UserID -s ServerURL ReadAll Picklist 
        

          Updating or Inserting a Set of Picklist Values for a Single Object (Upsert)

          This topic describes how to update a set of picklist values (if the set exists) or insert a set of picklist values (if the set does not exist) in your Oracle CRM On Demand environment (customer test environment or production).

          Syntax

          The following is the syntax for using the Oracle Migration Tool On Demand client to update a set of picklist values (if the set exists) or insert a set of picklist values (if the set does not exist):

          migrationtool -u UserID -s ServerURL Upsert Picklist PicklistXML 
          

          where:

          • UserID is the user sign-in ID that has the appropriate privileges to run the Oracle Migration Tool On Demand client commands.

          • ServerURL is the URL for the Oracle CRM On Demand server where your company resides.

          • PicklistXML is the fully qualified path name of the picklist XML file, for example:

            C:\My Files\MyAccountPicklist.xml
            
          Note: The Oracle Migration Tool On Demand client requests your Oracle CRM On Demand password, which can be redirected (using the pipe command) to the client program from standard input; that is, from a file, from the command line, or from another program.

          Example of Updating or Inserting a Set of Picklist Values for a Single Object

          The following is an example of updating a set of custom picklist values for the Account object (if the set exists) or inserting a set of custom picklist values (if the set does not exist) in your Oracle CRM On Demand server:

          migrationtool -u UserID -s ServerURL Upsert Picklist "C:\My Files\MyAccountPicklist.xml"
          
          Note: Quotation marks are required only if the path or file name contains spaces.