Post

1 follower Follow
0
Avatar

All values of Custom fields not reurned by API

Hey,

 

We are trying to get all values in a custom field having data type - pick list being item - Project. It is returning those values for which a project is been created and defined. Below is code snippet for same:

 $LeftParent = array(

            "FieldName" => "C_lob");

        $RightParent = array("Value" => null);

        $ParentCondition = array(

            "LeftExpression" => new SoapVar($LeftParent, SOAP_ENC_OBJECT, "FieldExpression", "http://clarizen.com/api/queries"),

            "Operator" => "NotEqual",

            "RightExpression" => new SoapVar($RightParent, SOAP_ENC_OBJECT, "ConstantExpression", "http://clarizen.com/api/queries"));

        $params = array(

            "Fields" => array("C_lob"),

            "TypeName" => "Project",

            "Where" => new SoapVar($ParentCondition, SOAP_ENC_OBJECT, "Compare", "http://clarizen.com/api/queries"),

            "Paging" => array(

                "PageNumber" => 0,

                "PageSize" => 1000

            )

        );

 

Please help! We want all values in pick list custom field!!

 

Thanks,

Shivani

 

 

Shivani Gupta Answered

Please sign in to leave a comment.

1 comment

1
Avatar

Hi Shivani,

The best way to retrieve all values of a picklist is to use DescribeEntitiesMessage specifying the pickup entity name in TypesNames. The result EntityDescriptions should contain the PickupEntityDescription with the Pickups collection.

If you don't know the pickup entity name, use DescribeEntitiesMessage _on the entity containing the pickup field (_Project in this case), and check the ReferencedEntities property in the appropriate FieldDescription within the Fields collection.

Hope this helps,

Ophir

Ophir Kenig 1 vote
Comment actions Permalink