The getPostingTransactionSummary operation lets you retrieve a summary of the actual data that posted to the general ledger in an account. You can use available filters and fields to generate reports that are similar to what you see when you run financial reports such as a Trial Balance, Balance Sheet, or an Income Statement.
The getPostingTransactionSummary operation returns the fields defined in PostingTransactionSummary. You can query by any filter defined in PostingTransactionSummaryFilter and group the results by any field defined in PostingTransactionSummaryField.
The first call to the operation returns the first page, total number of hits (totalRecords), and the number of pages. You can then retrieve subsequent pages by giving the page number.
Also note the following:
This operation can only be executed in a role that has the Financial Statements permission assigned. To enable this permission for a role, a NetSuite administrator must go to Setup > User Roles > Manage Roles, click the Reports tab, select Financial Statments from the Permission list, and then click Save.
To search for null, specify -1. If the return is null, the element will be skipped (not -1).
A maximum of 10,000 expressions is supported. A request with more than this number of expressions returns an error.
For large reports (for example, you have chosen all the columns), the query will take a long time on first request, but subsequent requests will be fast. Make sure your timeout limit is set high.
The amounts returned from getPostingTransactionSummary are in the currency of the subsidiary, not the parent. If you want the amounts in the currency of the parent, you must programmatically apply the appropriate exchange rate. To obtain exchange rates, you must call getConsolidatedExchangeRate, which reads data from the Consolidated Exchange Rate table. In your code, you must then multiply amount values returned by getPostingTransactionSummary by the exchange rate values returned by getConsolidatedExchangeRate.
Although the NetSuite UI automatically consolidates all amounts, you must perform your own exchange rate calculations in SOAP web services.
Request
<soapenv:Envelope
xmlns:xsd='http://www.w3.org/2001/XMLSchema'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:platformCore='urn:core_2021_2.platform.webservices.netsuite.com'
xmlns:listRel='urn:relationships_2021_2.lists.webservices.netsuite.com'
xmlns:listAcct='urn:accounting_2021_2.lists.webservices.netsuite.com'
xmlns:platformMsgs='urn:messages_2021_2.platform.webservices.netsuite.com'>
<soapenv:Header>
<tokenPassport xsi:type='platformCore:TokenPassport'>
<account xsi:type='xsd:string'>{{accountId}}</account>
<consumerKey xsi:type='xsd:string'>{{consumerKey}}</consumerKey>
<token xsi:type='xsd:string'>{{tokenId}}</token>
<nonce xsi:type='xsd:string'>{{nonce}}</nonce>
<timestamp xsi:type='xsd:long'>{{timestamp}}</timestamp>
<signature algorithm='HMAC_SHA256' xsi:type='platformCore:TokenPassportSignature'>{{signature}}</signature>
</tokenPassport>
</soapenv:Header>
<soapenv:Body>
<getPostingTransactionSummary xsi:type='platformMsgs:GetPostingTransactionSummaryRequest'>
<fields xsi:type='platformCore:PostingTransactionSummaryField'>
<entity xsi:type='xsd:boolean'>true</entity>
</fields>
<filters xsi:type='platformCore:PostingTransactionSummaryFilter'>
<entity xsi:type='platformCore:RecordRefList'>
<recordRef xsi:type='platformCore:RecordRef' internalId='3' type='customer'></recordRef>
</entity>
</filters>
<pageIndex xsi:type='xsd:int'>1</pageIndex>
</getPostingTransactionSummary>
</soapenv:Body>
</soapenv:Envelope>
Response
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<platformMsgs:documentInfo
xmlns:platformMsgs="urn:messages_2021_2.platform.webservices.netsuite.com">
<platformMsgs:nsId>WEBSERVICES_TSTDRV2782962_08062023830864461229640351_aad42b8</platformMsgs:nsId>
</platformMsgs:documentInfo>
</soapenv:Header>
<soapenv:Body>
<getPostingTransactionSummaryResponse
xmlns="">
<getPostingTransactionSummaryReturn xsi:type="GetPostingTransactionSummaryResult"
xmlns:platformCore="urn:core_2021_2.platform.webservices.netsuite.com">
<platformCore:status isSuccess="true"/>
<platformCore:totalRecords>0</platformCore:totalRecords>
<platformCore:pageSize>1000</platformCore:pageSize>
<platformCore:totalPages>1</platformCore:totalPages>
<platformCore:pageIndex>1</platformCore:pageIndex>
<platformCore:operationId>WEBSERVICES_TSTDRV2782962_08062023830864461229640351_aad42b8</platformCore:operationId>
</getPostingTransactionSummaryReturn>
</getPostingTransactionSummaryResponse>
</soapenv:Body>
</soapenv:Envelope>