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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Web</strong> <strong>Services</strong> Operationssearch203Java/* Generate a <strong>NetSuite</strong>Port */<strong>NetSuite</strong>ServiceLocator nss = new <strong>NetSuite</strong>ServiceLocator();NetSutePortType my<strong>NetSuite</strong>Port = nss.get<strong>NetSuite</strong>Port();/* Here your code needs to generate a valid Netsuite Sso token */String mySsoToken = MySSOManager.getTokenFromIds("myCompanyID","thisUsersUIDinMySystem");RecordRef rr = new RecordRef();rr.setid("23");/* Setup the Credential */SsoCredentials sc = new SsoCredentials();sc.setAccount("TSTDRV00000");sc.setEmail("bob@happycow.com");sc.setPassword("fr0mCA");sc.setRole(rr);sc.setAuthenticationToken(mySsoToken);/* Now initiate the mapping*/try{SessionResponse sr = my<strong>NetSuite</strong>Port.mapSso(sc);if (!sr.getStatus().isIsSuccess())throw new Exception("Mapping Failed: " + sr.getStatus().getStatusDetail(0).getMessage());}searchThe search operation is used to execute a search on a specific record type based on a set ofcriteria. You can search by defining search filter fields on the record, joined fields on anassociated record, search return columns, or joined search return columns from an associatedrecord. The results of the search can be complete records, or a select set of fields specifiedthrough search return columns.Note that you can also use the search operation to return an existing saved search. You cannotuse the search operation to retrieve state values. You must use the getAll operation to retrieveall state values in the system. The getAll operation will return all states, not just the legal onesfor your default country. Also note that the country and state must match on the address.Important: Be aware that the search preferences you set in SearchPreferences objectaffect the search request and response. See Setting <strong>Web</strong> <strong>Services</strong> Preferencesfor details.Use the search operation to execute the following types of searches:• Basic search: Execute a search on a record type based on search filter fields that arespecific to that type. See Basic Searches in <strong>Web</strong> <strong>Services</strong>.• Joined search: Execute a search on a record type based on search filter fields on anassociated record type. See Joined Searches in <strong>Web</strong> <strong>Services</strong><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!