[SalesForce] Unable to access all DataExtension properties. Can’t get the DataExtensionField(s)

I'm having this issue with the php soap-api where I'm just unable to connect a DataExtension to a DataExtensionField. To be more precise, I can't get the DataExentensionFields related to a DataExtension object.

When I return all DataExtension(s) I should be able to specify in the properties array (which tells the api what to return) the Fields property which is specified in the DataExtension definition here: http://help.exacttarget.com/en/technical_library/web_service_guide/objects/dataextension/
Could it be a permission problem?
Here is an example snipped from the code I use:

                       * Create the retrieve request for data extensions
           * @var ExactTarget_RetrieveRequest
           */
                $re = new ExactTarget_RetrieveRequest();
                $re->ObjectType = "DataExtension";
                $re->Properties =  array();
                $re->Properties[] = "Name";
                $re->Properties[] = "ObjectID";
                $re->Properties[] = "PartnerKey"; 
                $re->Properties[] = "IsSendable";
                $re->Properties[] = "Status";
                $re->Properties[] = "Fields";
                $re->Options = NULL;
                                     /**
                 * return all available extensions
                 *
                 * @var array
                 */
                $rre = new ExactTarget_RetrieveRequestMsg();
                $rre->RetrieveRequest = $re;
                $results = $this->connection->Retrieve($rre);
                $extensions_ =$results->Results;

The result is:

stdClass Object
(
    [OverallStatus] => Error: The Request Property(s) Fields do not match with the fields of DataExtension retrieve
    [RequestID] => 7b01e972-d522-4329-a082-77e9d3015b64
)

If I delete the line ** $re->Properties[] = "Fields";** everything works as expected. This happens to many other properties in the object definition, if I request them.

Best Answer

You need the DataExtensionField objects, filtering on the DataExtension object.

Related Topic