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.

Setting <strong>Web</strong> <strong>Services</strong> PreferencesSetting the Internal ID Preference35PaginationPagination breaks up a large number of records that are part of a search result set into smallerpages. You then have the ability to retrieve these pages of records one at a time. Pagination isused mainly to make processing large result sets earier and more manageable.There are two different ways for a page size to be determined:• System-defined maximum page size: This is set to 1000 records for synchronous <strong>Web</strong>service requests by default• User-defined page size parameter: The pageSize element in the searchPreference typeis used to specify a value for the page size. The value must be greater than 10 and lessthan the system-defined maximum of 1000.If the number of records for the search results exceeds the page size, the remaining results mustbe retrieved in a subsequent operation using the searchMore operation.Returning Search ColumnsWhen executing an advanced search, you can set the SearchPreferences.returnSearchColumnspreference to TRUE to ensure that only search return columns are returned in a search. Anerror is thrown if returnSearchColumns is set to TRUE and you have not specified search returncolumns in your request. Note that in an advanced search, the bodyFieldsOnly preference isignored.The default value for returnSearchColumns is TRUE.For information on advanced search in <strong>Web</strong> services, see Advanced Searches in <strong>Web</strong> <strong>Services</strong>.Sample CodeJavaIn this example, a SearchPreference object is instantiated and search preferences are set.<strong>NetSuite</strong>BindingStub stub = (<strong>NetSuite</strong>BindingStub)aPort;stub.clearHeaders();SOAPHeaderElement searchPrefHeader = newSOAPHeaderElement("urn:messages_2_5.platform.webservices.netsuite.com","searchPreferences");SearchPreferences searchPrefs = new SearchPreferences();searchPrefs.setPageSize(new Integer(nPageSize));searchPrefs.setBodyFieldsOnly(isBodyFieldsOnly);searchPrefHeader.setObjectValue(searchPrefs);stub.setHeader(searchPrefHeader);Setting the Internal ID PreferenceYou can configure <strong>NetSuite</strong> to display internal ID values on forms in the UI. This is usefulduring development as a quick reference to verify that the internal ID values submitted onRequests match the records expected as shown in the UI.<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!