10.07.2015 Views

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SuiteTalk (Web Services) Platform Guide - NetSuite

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Web</strong> <strong>Services</strong> OperationssearchMore235searchMore}ListOrRecordRef listOrRecordRef = new ListOrRecordRef();listOrRecordRef.internalId = "3";listOrRecordRef.typeId = "1";searchMultiSelectCustomField.searchValue = new ListOrRecordRef[] { listOrRecordRef };SearchCustomField[] searchCustomFieldList = new SearchCustomField[] {searchMultiSelectCustomField };//Java//searchCustomFieldList.setCustomField(new SearchCustomField[]{searchMultiSelectCustomField});transactionSearchBasic.customFieldList = searchCustomFieldList;transactionSearch.basic = transactionSearchBasic;SearchResult searchRes = _service.search(transactionSearch);_out.info("\nSearch Result contains " + searchRes.totalRecords + " record(s) \n");}else{_out.info("\nCannot call search operation because there is no active session. " +"You must be first logged on before attempting to call saved search.\n");}The seachMore operation is used to retrieve more records after an initial search operation.Important: Users who authenticate to <strong>NetSuite</strong> through login can use either searchMoreor searchMoreWithId to paginate through search results. Users whoauthenticate to <strong>NetSuite</strong> by providing user credentials in the header of theirSOAP requests can use only searchMoreWithId to paginate through searchresults, since searchMore requires an active session.(See Authentication Using Request Level Credentials for information onrequest-level-credential authentication.)The results returned in a searchMore operation reflect the records in the next segment asdefined in the original search operation. Therefore, if a record is deleted before all records havebeen returned, the total number of records may differ from the total record count returned inthe search operation — the deleted record is not returned. If a record is added, that record isnot returned in subsequent searchMore operations. However, the data in each record returnedis current such that if a change to a record occurs in between the time of the original searchoperation and the searchMore operation, the updated data is returned.ExampleSuppose you submit the following request for all employees whose firstName contains ‘Susan’and set the pagesize to 10 records:true10<strong>SuiteTalk</strong> <strong>Platform</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!