7Migrating Picklist Values
Migrating Picklist Values
This chapter describes how to migrate picklist values using the command-line interface of 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 |
---|---|
|
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. |
|
This command exports all picklist values separated by the object name. |
|
This command updates or inserts a set of picklist values in a particular object. |
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
andReadAll
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> |
<OrderAllLanguages> specifies whether the values in the picklist field are to be ordered alphabetically for all languages (Y) or ordered according to the values specfied in the <Order> element (N). |
<data:Picklist> . . . <data:OrderAllLanguages>N</data:OrderAllLanguages> . . . </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:
|
<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:
|
<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:Description>CEO of the division</data:Description>
</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:
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.
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
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
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.
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
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"