Skip to main content

 

Planview Customer Success Center

Get Specified Field Values for an Instance of an Entity

selectEntity is recommended instead of findEntity if you know the entity ID.

Use selectEntity to return a list of values from one specific entity (recommended if you know the entity ID). The entityTypeId specifies the type of entity (project, resource, account), and the entityID contains the ID of the specific instance of that entity. Then, you can specify an array containing the fields to return. If no list is used, the most common field values will be returned (excluding description and a few other fields that might contribute to a large response size). We recommend always providing a specific list of fields (rather than all fields) to optimize performance. It is possible to use findEntity with a searchValuePair based on the entityID, but faster to use selectEntity.

This example is looking for a specific resource (entityTypeId 11 = resource, entityId = specific resource), and then returns a set of field values specified by the list of fieldsRequest.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services">

   <soapenv:Header/>

   <soapenv:Body>

      <ser:selectEntity>

         <ser:sessionId>F0C6EDD44B270B1F3DD0F1492A2A1585</ser:sessionId>

         <!--entity type id is 11 since it is a resource lookup -->

         <ser:entityTypeId>11</ser:entityTypeId>

        <!--the resource id which is same as userId -->

         <ser:entityId>8826911</ser:entityId>

         <!--the attributes to be fetched, specified by field ID -->        

         <ser:fieldsRequest>1103</ser:fieldsRequest>          <!--Resource Name -  First name -->        

         <ser:fieldsRequest>1104</ser:fieldsRequest>          <!--Resource Name – Last name -->        

         <ser:fieldsRequest>1107</ser:fieldsRequest>          <!--Immediate Supervisor Id-->        

         <ser:fieldsRequest>1121</ser:fieldsRequest>          <!--Immediate Supervisor Name-->        

         <ser:fieldsRequest>1115</ser:fieldsRequest>          <!--email-->        

      </ser:selectEntity>

   </soapenv:Body>

</soapenv:Envelope>

 

Response

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

   <soapenv:Body>

      <ns:selectEntityResponse xmlns:ns="http://services">

         <ns:return xsi:type="ax21:EntityObj" xmlns:ax21="http://objects.services/xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

            <ax21:entityId>8351782</ax21:entityId>

            <ax21:entityTypeId>11</ax21:entityTypeId>

            <ax21:methodValues xsi:type="ax21:ValuePair">

               <ax21:elementValue>Jane</ax21:elementValue>

               <ax21:id>1103</ax21:id>

            </ax21:methodValues>

            <ax21:methodValues xsi:type="ax21:ValuePair">

               <ax21:elementValue>Doe</ax21:elementValue>

               <ax21:id>1104</ax21:id>

            </ax21:methodValues>

            <ax21:methodValues xsi:type="ax21:ValuePair">

               <ax21:elementValue>8349290</ax21:elementValue>

               <ax21:id>1107</ax21:id>

            </ax21:methodValues>

            <ax21:methodValues xsi:type="ax21:ValuePair">

               <ax21:elementValue>Supervisor, Immediate 1</ax21:elementValue>

               <ax21:id>1121</ax21:id>

            </ax21:methodValues>

            <ax21:methodValues xsi:type="ax21:ValuePair">

               <ax21:elementValue>jdoe@innotas.com</ax21:elementValue>

               <ax21:id>1115</ax21:id>

            </ax21:methodValues>

         </ns:return>

      </ns:selectEntityResponse>

   </soapenv:Body>

</soapenv:Envelope>