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

GetPicklistValues


Gets picklist values from Oracle CRM On Demand.

Objects Supported

GetPicklistValues is supported for all Web Services v1.0 and v2.0 accessible parent-level objects.

Usage

You use the GetPicklistValues method to enable external applications to present lists of values to users, typically in a language-dependent manner. The method can get lists of possible values for both cascading and regular picklist fields but cannot get the lists of possible values for read-only picklist fields.

If the record type is supported for Web Services v1.0, then the picklists returned are those applicable for Web Services v1.0. This is the case even if the record type is supported for Web Services v2.0 as well. If a picklist is not exposed for Web Services v1.0, then the picklist cannot be returned using GetPicklistValues, even if the picklist is exposed for Web Services v2.0.

If the record type is supported only for Web Services v2.0, then the picklists returned are those applicable for Web Services v2.0.

Because On Demand Web Services is language-independent, it is the client application's responsibility to convert code from the language-independent code (LIC) used by Oracle CRM On Demand to language-dependent values (LDVs) typically used by the external presentation layer.

The returned list of values corresponds to the organization to which the current user belongs (that is, the user whose credentials have been passed during the log-in call).

Cascading picklists restrict the values of one picklist, the related picklist, based on the value selected in another picklist, the parent picklist. For example, a parent picklist might present a list of IT areas and drive the value of a related picklist called SubAreas. When the user selects, for example, the value Installation for Area, the SubAreas picklist is dynamically constrained to show only the picklist values that are associated with the Installation area, for example, Server Crash and No Admin Login.

If the provided picklist has a parent, only the values that have a parent are returned. When a picklist has a parent, the result set includes the parent and the child values and at the end includes an empty set that contains all values available for the requested picklist.

If a picklist is not cascading, the following elements are returned empty:

  • ParentFieldName
  • ParentDisplayValue
  • ParentCode

If a "10/2004" namespace is used, the FieldName and ParentFieldName elements respectively accept and return the integration tag value for custom fields, otherwise, they accept and return the generic custom field tag names (that is, CustomPicklist1 and so on).

Arguments

Table 52 describes the arguments taken by the GetPicklistValues method.

Table 52. Arguments Taken by the GetPicklistValues 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

LanguageCode

The code of the language in which language-dependent values are to be returned, 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

ListOfParentPicklistValue

A sequence of ParentPicklistValue elements.

Yes

Not applicable

Output

Return Value of the Call

A list of picklist values. For a cascading picklist, this includes the values for the related picklist that apply for particular values of the parent picklist. For a regular picklist, values for parent picklist are not included.

The ParentPicklistValue element contains the following child elements:

  • Language. The language.
  • ParentFieldName. The parent picklist field name as an integration tag.
  • ParentDisplayValue. A display value translated into the specified language.
  • ParentCode. A parent Language Independent Code (LIC).
  • ListOfPickListValue. A sequence of PicklistValue elements containing the related picklist values that correspond to the parent picklist value.

The PicklistValue element contains the following child elements:

  • DisplayValue. The display value translated into the specified language.
  • Code. The Language Independent Code (LIC).

Sample SOAP Request - GetPicklist

The following SOAP request retrieves the picklist values in French for the Priority picklist of the account record type.

<?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_GetPicklistValues_Input xmlns="urn:crmondemand/ws/picklist/">

         <RecordType>Account</RecordType>

         <FieldName>Priority</FieldName>

         <LanguageCode>FRA</LanguageCode>

      </PicklistWS_GetPicklistValues_Input>

   </soap:Body>

</soap:Envelope>

Sample SOAP Response

The following response contains values for the Priority picklist of Account, including the French language display values:

<?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_GetPicklistValues_Output xmlns:ns="urn:crmondemand/ws/picklist/">

         <ListOfParentPicklistValue xmlns="urn:/crmondemand/xml/picklist">

            <ParentPicklistValue>

               <Language>FRA</Language>

               <ParentFieldName></ParentFieldName>

               <ParentDisplayValue></ParentDisplayValue>

               <ParentCode></ParentCode>

               <Disabled></Disabled>

               <ListOfPicklistValue>

                  <PicklistValue>

                     <Code>Low</Code>

                     <DisplayValue>Faible</DisplayValue>

                     <Disabled>N</Disabled>

                  </PicklistValue>

                  <PicklistValue>

                     <Code>Medium</Code>

                     <DisplayValue>Moyen</DisplayValue>

                     <Disabled>N</Disabled>

                  </PicklistValue>

                  <PicklistValue>

                     <Code>High</Code>

                     <DisplayValue>Elevé</DisplayValue>

                     <Disabled>N</Disabled>

                  </PicklistValue>

               </ListOfPicklistValue>

            </ParentPicklistValue>

         </ListOfParentPicklistValue>

      </ns:PicklistWS_GetPicklistValues_Output>

   </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

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