Read()

read
The read method is used to retrieve one or more records from Intacct given a list of record keys. The record key for custom objects is always theidfield. For standard objects, the key is defined as thevidin the object definition.

Arguments
object: The name of the object to read. fields: A comma separated list of fields to return. Use the "*" character to signify you wish to return all fields. To return a field within a nested structure, use dot notation. For example, to return the billing zipcode for a customer, pass BILLTOCONTACT.MAILADDRESS.ZIPCODE. keys: A comma separated list of keys signifying the records you wish to retrieve. Optionally pass an empty argument and get up to 100 records returned. '' While in development the return count will not be capped. Platform objects do not yet support an unbounded argument list.'' returnFormat: One of the values "csv", "json", "xml". If the user passes no value, will return a fully constructed xml response.

Return
The read method returns adata element containing one or more records matching the list of ids provided.

Read a custom object
The following sample shows how to read a collection of custom objects with known keys (id fields). &lt;read&gt; &lt;object&gt;api_test_record&lt;/object&gt; &lt;!-- use the "*" character to return all fields. --&gt; &lt;fields&gt;name,api_autonumber,api_checkbox,api_checkboxes,api_currency&lt;/fields&gt; &lt;keys&gt;41145,41147&lt;/keys&gt; &lt;!-- enter "csv" to return the results as a flat csv file with no XML markup or "json" for javascript serialization --&gt; &lt;returnFormat&gt;xml&lt;/returnFormat&gt; &lt;/read&gt;

Read a standard object
Read a collection of vendor records &lt;read&gt; &lt;object&gt;vendor&lt;/object&gt; &lt;keys&gt;Unit - A-1206,Unit - A-1205,Unit - A-1203,Unit - A-1204,ID Provided 1&lt;/keys&gt; &lt;!-- use the "*" character to return all fields --&gt; &lt;fields&gt;VENDORID,TOTALDUE,DISPLAYCONTACT.PRINTAS,WHENMODIFIED,API_DATE&lt;/fields&gt; &lt;returnFormat&gt;xml&lt;/returnFormat&gt; &lt;/read&gt;