Oracle Web Services On Demand Guide > Web Services On Demand API Calls > Service API Calls >

UpdatePicklist


Updates picklist values in Oracle CRM On Demand.

Objects Supported

UpdatePicklist is supported for the same objects as supported by the GetPicklistValues method, see GetPicklistValues.

Usage

You use the UpdatePicklist method to update lists of values, typically in a language-dependent manner.

The ListOfPicklistValues argument contains a sequence of PicklistValues elements, each of which has the following child elements:

  • DisplayValue. The display value in the specified language.
  • Code. The Language Independent Code (LIC).
  • Order. The order of the value in the list.

    NOTE:  If a value for Order is not included in an update request, the value is not automatically updated. The automatic update functionality is only supported in the UI.

  • NeedTranslate. Whether the value is needed for translation.
  • Disabled. Whether the value is disabled.

If the CreateNew argument is set to Y, new picklist values are created with the specified values.

If the CreateNew argument is set to Y, new picklist values are created with the specified values from DisplayValue and Order, which are required values.

If the CreateNew argument is set to N, existing picklist values are updated with the specified values from DisplayValue or Code, as long as these values are valid.

You cannot use the UpdatePicklist method to create custom picklists or multi-select picklists. You must create new picklist fields through the Oracle CRM On Demand application UI.

You cannot update read-only picklist fields.

Arguments

Table 64 describes the arguments taken by the UpdatePicklist method.

Table 64. Arguments Taken by the UpdatePicklist Method
Name
Description
Required
Default
I/O

RecordType

The record type; this is case insensitive

Yes

Not applicable

Input

FieldName

The name of the picklist field.

Yes

Not applicable

Input

CreateNew

Whether new picklist values are to be created. A value of Y specifies that new picklist values are to be created, the default value of N specifies that picklist values are to be updated.

No

N

Input

ListOfPicklistValue

A sequence of PicklistValue elements containing the picklist values to be updated or added.

Yes

Not applicable

Input

LanguageCode

The language code for the picklist values to be updated, for example, ENU, DEU, FRA, ESN, and so on. If the code is not specified, the default language for the current session's user is used.

No

User's Default Language

Input

Status

A string indicating the success of the call or an error message if unsuccessful.

Not applicable

Not applicable

Output

Return Value of the Call

Returns a status string indicating the success or otherwise of the call.

Sample SOAP Requests and Responses

This topic contains sample SOAP requests that invoke UpdatePicklist.

Sample SOAP Request 1 - UpdatePicklist: Create a New Picklist Value

The following SOAP request creates a new picklist value for the CallFrequency picklist of the account record type.

NOTE:  When you create new picklist values, the <Code> element is not taken into consideration, and the LIC will be equal to the <DisplayValue> value.

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <PicklistWS_UpdatePicklist_Input xmlns="urn:crmondemand/ws/picklist/">

         <RecordType>Account</RecordType>

         <FieldName>CallFrequency</FieldName>

         <CreateNew>Y</CreateNew>

         <ListOfPicklistValues>

            <PicklistValues>

               <Code>BiYearly</Code>

               <DisplayValue>BiYearly_v</DisplayValue>

               <NeedTranslate>N</NeedTranslate>

               <Order>3</Order>

               <Disabled>N</Disabled>

            </PicklistValues>

         </ListOfPicklistValues>

      </PicklistWS_UpdatePicklist_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Request 2 - UpdatePicklist: Update an Existing Picklist Value

The following SOAP request updates an existing picklist value for the CallFrequency picklist of the account record type. The picklist value is updated in the user's default language:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <PicklistWS_UpdatePicklist_Input xmlns="urn:crmondemand/ws/picklist/">

         <RecordType>Account</RecordType>

         <FieldName>CallFrequency</FieldName>

         <ListOfPicklistValues>

            <PicklistValues>

               <Code>BiYearly_v</Code>

               <DisplayValue>BiYearly</DisplayValue>

               <Order>3</Order>

               <Disabled>N</Disabled>

            </PicklistValues>

         </ListOfPicklistValues>

      </PicklistWS_UpdatePicklist_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Request 3 - UpdatePicklist with LanguageCode

The following SOAP request updates an existing picklist value for the CallFrequency picklist of the account record type. The picklist value is updated in French according to the <LanguageCode> value specified in the request:

<?xml version="1.0" encoding="utf-8" standalone="no"?>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <soap:Header>

      <wsse:Security>

         <wsse:UsernameToken>

            <wsse:Username>%%%USERNAME%%%</wsse:Username>

            <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">%%%PASSWORD%%%</wsse:Password>

         </wsse:UsernameToken>

      </wsse:Security>

   </soap:Header>

   <soap:Body>

      <PicklistWS_UpdatePicklist_Input xmlns="urn:crmondemand/ws/picklist/">

         <RecordType>Account</RecordType>

         <FieldName>CallFrequency</FieldName>

         <CreateNew>N</CreateNew>

         <LanguageCode>FRA</LanguageCode>

         <ListOfPicklistValues>

            <PicklistValues>

               <Code>BiYearly_v</Code>

               <DisplayValue>BiYearly_FRA</DisplayValue>

               <NeedTranslate>N</NeedTranslate>

               <Order>3</Order>

               <Disabled>N</Disabled>

            </PicklistValues>

         </ListOfPicklistValues>

      </PicklistWS_UpdatePicklist_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Requests

The response is the same for each of the three sample SOAP requests:

<?xml version="1.0" encoding="utf-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

   <SOAP-ENV:Body>

      <ns:PicklistWS_UpdatePicklist_Output xmlns:ns="urn:crmondemand/ws/picklist/">

         <ns:Status>TRUE</ns:Status>

      </ns:PicklistWS_UpdatePicklist_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Oracle Web Services On Demand Guide, Version 25.0 (Oracle CRM On Demand Release 37) Copyright © 2018, Oracle and/or its affiliates. All rights reserved. Legal Notices.