I have used this code before to retrieve a list of all data extensions using the SOAP API
$client = $this->_initSfApi(); $request = new ExactTarget_RetrieveRequest(); $object_type = 'DataExtension'; $request->ObjectType = $object_type; $request->Properties = $this->_getPropertyDefinition($object_type); $requestMsg = new ExactTarget_RetrieveRequestMsg(); $requestMsg->RetrieveRequest = $request; /** @noinspection PhpUndefinedMethodInspection */ $results = $client->Retrieve($requestMsg);
I would like to do a similar thing for listing TriggeredSend objects, so I can populate a dropdown list instead of requiring customers to type in the internal name of the triggered send they wish to use. I am not having any luck, however, and am hoping someone knows the answer.
Using the above code I have tested with a variety of values for
$object_type. Below is a list of the resulting error messages.
TriggeredSend-> Error: No view defined for the object type: TriggeredSend
TriggeredSends-> Error: TriggeredSends is not a valid ObjectType.
TriggeredSendDefinition-> Error: Object reference not set to an instance of an object.
TriggeredSendSummary-> Error: Object reference not set to an instance of an object.
Any help would be greatly appreciated. Thank you.