Jump to content

Nomisdk

New Members
  • Posts

    4
  • Joined

  • Last visited

Nomisdk's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Ok it works But i get the following notice: Notice: Undefined property: stdClass::$Entity in /var/www/Autotask/class.autotask.php on line 114 Line 114 is: #MAD OR test Entity to see if it has children? if (!$result->queryResult->EntityResults->Entity) break; How to fix this?
  2. Hi David I always get the same order returned from the API, so I dont think that the "<order direction="ascending">id</order>" is needed. The following is stated in the API User guide: query() This API call executes a query against Autotask and returns an array of matching entities. The queries are built using the QueryXML format and will return a maximum of 500 records at once, sorted by their id value. (https://www.autotask.net/help/content/Userguides/T_WebServicesAPIv1_5.pdf) I will try testing your code later today
  3. Hi I have the following function pulling data from a API. Sadly there is a limit at the API, that i can only pull 500 entries. I cant query the API for a total number for entires. What i need help for is, how i can make it query the API and save the data, untill it has all entires. public function loadAccounts() { $startid = -1; $xml = ' <queryxml> <entity>Account</entity> <query> <field>id<expression op="greaterthan">'. $startid .'</expression></field> </query> </queryxml> '; $query = new query ( $xml ); $result = $this->client->query ( $query ); $this->accounts = Array (); $laccounts = $result->queryResult->EntityResults->Entity; foreach ( $laccounts as $account ) { $this->accounts [$account->id] = $account; } Can someone help me setting the code up, so it will re-quey untill it has all entries?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.