I'm using a PHP framework someone built that allows for easier use of the Autotask ticketing/CRM system API. I have been able to navigate querying the database, but cannot seem to read through the data it returns. A var_dump of the results shows the following:
object(ATWS\AutotaskObjects\QueryResponse)[9]
public 'queryResult' =>
object(ATWS\AutotaskObjects\ATWSResponse)[10]
public 'EntityResults' =>
object(ATWS\AutotaskObjects\ArrayOfEntity)[11]
public 'Entity' =>
array (size=500)
...
public 'EntityResultType' => string 'contact' (length=7)
public 'EntityReturnInfoResults' =>
object(ATWS\AutotaskObjects\ArrayOfEntityReturnInfo)[1028]
public 'EntityReturnInfo' =>
array (size=500)
...
public 'Fields' => null
public 'UserDefinedFields' => null
public 'Errors' =>
object(ATWS\AutotaskObjects\ArrayOfATWSError)[1027]
public 'ATWSError' => null
public 'Fields' => null
public 'UserDefinedFields' => null
public 'ReturnCode' => int 1
Can someone please give me guidance on how I can get to the data in this result. I'm trying to get my hands on the "EntityReturnInfo" data. A sample is as follows
Here is what a print_r returns
ATWS\AutotaskObjects\QueryResponse Object ( [queryResult] => ATWS\AutotaskObjects\ATWSResponse Object ( [EntityResults] => ATWS\AutotaskObjects\ArrayOfEntity Object (
**THIS IS WHERE THE GOOD DATA STARTS***
[Entity] => Array ( [0] => ATWS\AutotaskObjects\Contact Object ( [AccountID] => 174 [Active] => 1 [FirstName] => John [LastName] => Doe [AccountPhysicalLocationID] => [AdditionalAddressInformation] => [AddressLine] => 123 Fake Street [AddressLine1] => Suite 2 [AlternatePhone] => [BulkEmailOptOut] => [BulkEmailOptOutTime] => [City] => Fake City [Country] => United States [CountryID] => 237 [CreateDate] => 2016-09-28T10:17:57.34 [EMailAddress] => Fake@email.com [EMailAddress2] => [EMailAddress3] => [Extension] => [ExternalID] => [FacebookUrl] => [FaxNumber] => [LastActivityDate] => 2016-09-28T11:17:24 [LastModifiedDate] => 2016-09-28T11:17:24.68 [LinkedInUrl] => [MiddleInitial] => [MobilePhone] => [NamePrefix] => [NameSuffix] => [Note] => [Notification] => 1 [Phone] => 123-456-7890 [PrimaryContact] => [RoomNumber] => [SolicitationOptOut] => [SolicitationOptOutTime] => [State] => NY [SurveyOptOut] => [Title] => [TwitterUrl] => [ZipCode] => 12345 [Fields] => [UserDefinedFields] => ATWS\AutotaskObjects\ArrayOfUserDefinedField Object ( [UserDefinedField] => ) [id] => 30682885 )
***AND THE DATA CONTINUES WITH***
[1] => ATWS\AutotaskObjects\Contact Object ( [AccountID] => etc etc etc etc