Monday, April 22, 2019

getPostingTransactionSummary returns an error: For pages > 1, search parameters must match the original search exactly

Problem: A user encounters the following error in the SOAP response when sending a getPostingTransactionSummary request via Web Services:

This could be caused by one of the following reasons:

Possible Cause # 1: Note that NetSuite caches the results after the first call to getPostingTransactionSummary as subsequent pages are being retrieved. In this case, the user might have indicated in the request the pageIndex is greater than 1, but did not run the initial getPostingTransactionSummary operation. Note that 'initial getPostingTransactionSummary' means that pageIndex is equal to 1.

Sample Request:


Possible Cause # 2: The user ran the initial getPostingTransactionSummary operation (pageIndex=1), but changed the filters/field values on the subsequent request.

Sample Request for initial getPostingTransactionSummary operation:


Sample Request for the next getPostingTransactionSummary operation:

Notice that for the first request, customer was set to true, but was changed to false on the next getPostingTransactionSummary request.

Possible Cause # 3: The session expired before running the next getPostingTransactionSummary operation. Web Service sessions automatically expires after 20 minutes of inactivity (see SuiteAnswers Article # 10802). If the session expired after the first request was called and the same request where pageIndex > 1 is sent, the response will return the said error since no initial request for such operation was submitted for the search results to be cached.

No comments:

Post a Comment