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> OperationsdeleteList135}}_out.info( "\nSince your answer was not Y, the records were not deleted." );Javapublic void deleteCustomRecord() throws RemoteException,ExceededUsageLimitFault, UnexpectedErrorFault, InvalidSessionFault,ExceededRecordCountFault {// This operation requires a valid sessionthis.login(true);CustomRecordRef customRecordRef = new CustomRecordRef();// Prompt user for the nsKey for Custom Record type to be deleted_console.write("Enter nsKey for Custom Record type to be deleted: ");customRecordRef.setTypeId(_console.readLn());// Prompt user for nsKey for Custom Record to be deleted_console.write("Enter nsKey for Custom Record to be deleted: ");customRecordRef.setInternalId(_console.readLn());// customRecordRef.typeSpecified = true;_console.write("Delete the record above? [Y/N]:");String userResponse = _console.readLn().toUpperCase();// Delete recordsif (userResponse.equals("Y")) {WriteResponse delResponse = _port.delete(customRecordRef);deleteList}// process response_console.info("\nThe following Custom Record deleted:\n");if (delResponse.getStatus().isIsSuccess()) {_console.info("key="+ ((CustomRecordRef) delResponse.getBaseRef()).getInternalId());} else {_console.errorForRecord(getStatusDetails(delResponse.getStatus()));}} else {_console.info("\nSince your answer was not Y, the records were not deleted.");}The deleteList operations is used to delete one or more existing instances of a certain recordtype in <strong>NetSuite</strong>.If there are multiple records, they can either be of the same record type or different recordtypes. For example, it’s possible to delete a customer and a contact within a single request usingthis operation.Note: An asynchronous equivalent is available for this operation, asyncDeleteList. Forinformation about asynchronous request processing, see Synchronous andAsynchronous Request Processing.<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!