8Migrating Cascading Picklists

Migrating Cascading Picklists

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

Cascading Picklists

Cascading picklists restrict the values of a picklist, which is the related picklist. The cascading picklist is derived from the value selected in another picklist, which is the parent picklist.

The following table describes the Oracle Migration Tool On Demand client commands used with cascading picklists. For more information about running these commands, see Migrating Cascading Picklists.

Table Oracle Migration Tool On Demand Commands for Cascading Picklists

Command Description

Read CascadingPicklist SystemNameOfObject

This command exports the values for all cascading picklists 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 CascadingPicklist

This command exports all cascading picklists for all of the objects set up for the user running the Oracle Migration Tool On Demand client.

Upsert CascadingPicklist CascadingPicklistXML

This command updates or inserts a cascading picklist, as required.

Privileges Required for Migrating Cascading Picklists

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.

    Cascading picklists 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 Cascading Picklist XML Output File

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

Table Elements and Sections in the Cascading Picklist XML File

Description Element or Section

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

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

The <ListOfCascadingPicklist> contains all of the cascading picklist definitions for the record type.

<data:ListOfCascadingPicklist>
. . .
</data:ListOfCascadingPicklist>

The <CascadingPicklist> section contains all of the details for a cascading picklist.

<data:CascadingPicklist>
. . .
</data:CascadingPicklist> 

<ParentPicklist> contains the parent picklist.

<data:CascadingPicklist>
  <data:ParentPicklist>Organization Relationship
  </data:ParentPicklist>
. . .
</data:CascadingPicklist> 

<RelatedPicklist> contains the related picklist.

<data:CascadingPicklist>
. . .
  <data:RelatedPicklist>Region</data:RelatedPicklist>
. . .
</data:CascadingPicklist> 

<Description> contains the description of the cascading picklist.

<data:CascadingPicklist>
. . .
  <data:Description></data:Description>
. . .
</data:CascadingPicklist> 

The <ListOfPicklistValueAssociations> section contains all of the associations for the cascading picklist.

<data:CascadingPicklist>
. . .
  <data:ListOfPicklistValueAssociations>
. . .
  </data:ListOfPicklistValueAssociations>
</data:CascadingPicklist> 

The <PicklistValueAssociations> section contains the details of the associations for a single value from the parent picklist:

  • <ParentPicklistValue> contains the parent picklist value.

  • <RelatedPicklistValue> contains a related picklist value. There is one <RelatedPicklistValue> element for each value in the related picklist that is associated with the <ParentPicklistValue>.

<data:CascadingPicklist> 
. . .
  <data:ListOfPicklistValueAssociations> 
    <data:PicklistValueAssociations>
      <data:ParentPicklistValue>IHN
      </data:ParentPicklistValue> 
      <data:RelatedPicklistValue>East
      </data:RelatedPicklistValue> 
      <data:RelatedPicklistValue>West
      </data:RelatedPicklistValue> 
    </data:PicklistValueAssociations> 
. . .
  </data:ListOfPicklistValueAssociations>
</data:CascadingPicklist>

Migrating Cascading Picklists

The following topics provide examples of how to use the Oracle Migration Tool On Demand client to export cascading picklists:

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

    Extracting Cascading Picklists for a Single Object

    This topic describes how to extract the cascading picklists 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 the cascading picklists for an object:

    migrationtool -u UserID -s ServerURL Read CascadingPicklist 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 are extracting the cascading 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 Cascading Picklists for a Single Object

    The following is an example of extracting the cascading picklists for the Account object:

    migrationtool -u UserID -s ServerURL Read CascadingPicklist Account
    
    Note: If the object name contains spaces, then it must be enclosed with quotation marks.

      Extracting Cascading Picklists for All Objects

      This topic describes how to extract all the cascading picklists from your Oracle CRM On Demand environment (customer test environment or production) for all objects set up for the user who is running the command.

      Syntax

      The following is the syntax for using the Oracle Migration Tool On Demand client to extract all cascading picklists for all objects set up for the user running the command:

      migrationtool -u UserID -s ServerURL ReadAll CascadingPicklist   
      

      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.

      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 Cascading Picklists for All Objects

      The following is an example of extracting all cascading picklists for all objects that you have set up on your Oracle CRM On Demand server:

      migrationtool -u UserID -s ServerURL ReadAll CascadingPicklist
      

        Updating or Inserting a Cascading Picklist (Upsert)

        This topic describes how to update a specific cascading picklist (if it exists), or insert that cascading picklist (if it does not exist) on your Oracle CRM On Demand environment (customer test environment or production). For the purposes of the Oracle Migration Tool On Demand client, this is known as an Upsert operation. This operation is specified using the Upsert command.

        About the Upsert Operation

        The Upsert command inserts or updates a cascading picklist based on the <ParentPicklist> and <RelatedPicklist> values. If a cascading picklist already exists with the same <ParentPicklist> and <RelatedPicklist> values, then an update occurs, otherwise, a new cascading picklist is inserted.

        An Upsert operation on a cascading picklist fails if the following conditions occur:

        • The parent picklist is the same as the related picklist because looping cascades are not allowed.

        • The parent or related picklist references a field that does not exist on the target system.

        • The parent or related picklist references a field that is not of type Picklist.

        • The related picklist references a parent picklist that is already referenced by another related picklist.

        Note: Related picklist values override the existing picklist values during an Upsert operation.

        Syntax

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

        migrationtool -u UserID -s ServerURL Upsert CascadingPicklist CascadingPicklistXML 
        

        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.

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

          C:\My Files\My CascadingPicklist.xml
          

        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 Cascading Picklist

        The following is an example of updating a specific cascading picklist (if it exists) or inserting that cascading picklist (if it does not exist) in your Oracle CRM On Demand server:

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