public class

NetSuiteCloudConnector

extends Object
java.lang.Object
   ↳ org.mule.module.netsuite.NetSuiteCloudConnector
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

The NetSuite cloud connector facade, based on a NetSuiteClient

Summary

Constants
String SUITETALK_LIVE_ADDRESS
Fields
private NetSuiteClientImpl client The Netsuite client to use.
private String connectionId The login email of both NetSuite UI and SuiteTalk
private static List<String> customKey
private String defaultEndpoint Service endpoint
    Supports:
  • Live: https://webservices.netsuite.com/services/NetSuitePort_2013_2
  • Sandbox: https://webservices.sandbox.netsuite.com/services/NetSuitePort_2013_2
Defaults to Live
private static final Logger logger
Public Constructors
NetSuiteCloudConnector()
Public Methods
RecordRef addFile(RecordRef folderId, Map<String, Object> attributes, Object content, String fileName, Preferences preferences)

Creates a new file record.

List<WriteResponse> addList(String recordType, List<Map<String, Object>> records, Preferences preferences)

Used to add one or more records into the system

BaseRef addRecord(String recordType, Map<String, Object> attributes, Preferences preferences)

Creates a new record.

List<WriteResponse> addRecordObjects(List<? extends Record> records)

Creates new records

Example:
AsyncStatusResult asyncAddList(RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to addRecord(String, Map, Preferences).

AsyncStatusResult asyncDeleteList(List<BaseRefType> records, Preferences preferences)

An asynchronous requests equivalent to #deleteList(Map).

AsyncStatusResult asyncDeleteListRecords(List<RecordRef> records, Preferences preferences)

An asynchronous requests equivalent to #deleteList(Map).

AsyncStatusResult asyncGetList(List<BaseRefType> records, Preferences preferences)

An asynchronous requests equivalent to #getList(Map).

AsyncStatusResult asyncGetListRecords(List<RecordRef> records, Preferences preferences)

An asynchronous requests equivalent to #getList(Map).

AsyncStatusResult asyncInitializeList(List<InitializeRecord> initializeRecord, Preferences preferences)

An asynchronous requests equivalent to #initializeRecord.

AsyncStatusResult asyncSearch(SearchRecordTypeEnum recordType, String expression, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

Searches for all records that match the given filtering expression, asynchronously.

AsyncStatusResult asyncUpdateList(RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to #updateRecord(Map).

AsyncStatusResult asyncUpsertList(RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to #upsertRecord(Map).

WriteResponse attachRecord(RecordRef source, RecordRef destination, RecordRef contact, RecordRef role, Preferences preferences)

Attaches a source or contact record - that is, the attachment - to another destination one

Not all record type are supported as source, destination or contact.

SessionResponse changeEmail(String newEmail, Boolean justThisAccount)

Use to change the email address for the account.

SessionResponse changePassword(String newPassword, Boolean justThisAccount)

Use to change the password for the account.

AsyncStatusResult checkAsyncStatus(String jobId, Preferences preferences)

Answers the status of an asynchronous Web services submission.

void connect(String email, String password, String endpoint, String account, String roleId, Long connectionTimeout, Long receiveTimeout)
Connection Management connect method
String connectionId()
WriteResponse delete(BaseRefType baseRef, Preferences preferences)

Deletes a record.

List<WriteResponse> deleteList(List<BaseRefType> records, Preferences preferences)

Used to delete one or more records in the system.

WriteResponse deleteRecord(RecordRef recordRef, Preferences preferences)

Deletes a record.

List<WriteResponse> deleteRecordsList(List<RecordRef> records, Preferences preferences)

Used to delete one or more records in the system.

WriteResponse detachRecord(RecordRef source, RecordRef destination, Preferences preferences)

Detaches a source record - that is, the attachment - from a destination record.

void disconnect()
Connection Management disconnect method
Map<String, Object> get(BaseRefType baseRef, Preferences preferences)

This is used to retrieve a record by providing the unique id that identifies that record.

AsyncResult getAsyncResult(String jobId, Integer pageIndex, Preferences preferences)

Answers the results of an asynchronous web services submission.

GetBudgetExchangeRateResult getBudgetExchangeRates(RecordRef period, RecordRef fromSubsidiary, RecordRef toSubsidiary, Preferences preferences)

Answers the list of budget exchange rates

Example:
NetSuiteClient getClient()
GetConsolidatedExchangeRateResult getConsolidatedExchangeRates(RecordRef period, RecordRef fromSubsidiary, RecordRef toSubsidiary, Preferences preferences)

Answers the list of consolidated exchange rates

Example:
GetCurrencyRateResult getCurrentRate(CurrencyRateFilter rateFilter, Preferences preferences)

Use this operation to get the exchange rate between two currencies based on a certain date.

GetCustomizationIdResult getCustomizationIds(GetCustomizationType type, boolean includeInactives, Preferences preferences)

Answers the ids of available customizations for a given record type.

GetDataCenterUrlsResult getDataCenterUrls(String accountId)
Use for dynamic discovery of data-center-specific URLs for partner applications’ access to NetSuite.
String getDefaultEndpoint()
GetDeletedResult getDeletedRecords(RecordTypeEnum type, String whenExpression, Date date1, Date date2, SearchDateFieldOperatorEnum operator, Preferences preferences)

Answers a list of deleted records of a given record type that match a given date expression.

GetItemAvailabilityResult getItemAvailability(RecordRef record, Date ifModifiedSince, Preferences preferences)

Answers the availability for a given record reference.

List<ReadResponse> getList(List<? extends BaseRef> references, Preferences preferences)

This operation is used to retrieve a list of objects referenced in the list of BaseRef object.

MetaData getMetaData(MetaDataKey key)
List<MetaDataKey> getMetaDataKeys()
GetPostingTransactionSummaryResult getPostingTransactionSummary(PostingTransactionSummaryField fields, PostingTransactionSummaryFilter filters, Integer pageIndex, Preferences preferences)

Use to retrieve a summary of the actual data in an account.

Map<String, Object> getRecord(RecordRef recordRef, Preferences preferences)

This is used to retrieve a record by providing the unique id that identifies that record.

GetAllResult getRecords(GetAllRecordType type, Preferences preferences)

This operation is used to retrieve a list of all records of the specified type.

GetSavedSearchResult getSavedSearch(RecordType type)

Retrieves a list of existing saved searches for the given record type.

GetSelectValueResult getSelectValue(int page, GetSelectValueFieldDescription fieldDescriptor, Preferences preferences)

Use to retrieve valid values for a given recordRef field where the referenced record type is not yet exposed in the Web services API or when the logged in role does not have permission to the instances of the record type.

Date getServerTime()

Answers the server time, resulting in more accurate and reliable sync'ing of data than using using local client time.

ReadResponse initialize(InitializeRecord record, Preferences preferences)

Populates fields on transaction line items with values from a related record, in a similar way empty text boxes are prepopulated within the Netsuite UI

Example:

List<ReadResponse> initializeList(List<InitializeRecord> initializeRecord, Preferences preferences)

Use to emulate the UI workflow by pre-populating fields on transaction line items with values from a related record.

boolean isConnected()
SessionResponse mapSso(String userAccount, String userPartnerId, String authenticationToken, String userEmail, String userPassword, RecordRef userRole)

Use to automate the mapping between external applications credentials and NetSuite’s credentials for a user.

SearchResult queryAsNativeResult(String query, boolean bodyFieldsOnly, Integer pageSize)

Return a list of records, or columns matching the query provided.

PagingDelegate<Map<String, Object>> queryRecords(String query, boolean bodyFieldsOnly, PagingConfiguration pagingConfiguration)

Return a list of records.

SearchResult search(SearchRecordTypeEnum searchRecord, Map<String, Object> criteria, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The search operation is used to execute a search on a specific record type based on a set of criteria.

SearchResult searchMore(int pageIndex, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The seachMore operation is used to retrieve more records after an initial search operation.

SearchResult searchMoreWithId(String searchId, int pageIndex, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The searchMoreWithId operation allows users to reference a specific search result set by its searchId, a parameter included in all search results.

SearchResult searchNext(boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The searchNext operation is used to retrieve the next set of records after an initial search operation.

SearchResult searchWithExpression(SearchRecordTypeEnum searchRecord, String expression, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The search operation is used to execute a search on a specific record type based on a set of criteria.

void setDefaultEndpoint(String defaultEndpoint)
SessionResponse ssoLogin(String partnerAccount, String partnerId, String authenticationToken)

Use to establish a single sign-on connection.

void updateCustomFieldsRecord(RecordType recordType, CustomFieldRefTypeEnum customFieldType, Map<String, Object> customFields, Preferences preferences)

Updates existing record's custom fields.

WriteResponse updateInviteeStatus(RecordRef eventId, CalendarEventAttendeeResponseEnum status, Preferences preferences)

Sets a new invitation status for a given event.

List<WriteResponse> updateInviteeStatusList(List<UpdateInviteeStatusReference> inviteeStatusList, Preferences preferences)

Sets a new invitation status for a given event.

List<WriteResponse> updateList(String recordType, List<Map<String, Object>> records, Preferences preferences)

Used to update one or more existing records in the system by providing new values for the fields to be updated for each record.

BaseRef updateRecord(String recordType, Map<String, Object> attributes, Preferences preferences)

Updates an existing record.

List<WriteResponse> updateRecordsList(List<? extends Record> records, Preferences preferences)

Used to update one or more existing records in the system by providing a list of records.

List<WriteResponse> upsertList(String recordType, List<Map<String, Object>> records, Preferences preferences)

The upsertList operation is used to add or update one or more instances of a record type in NetSuite.

BaseRef upsertRecord(String recordType, String externalId, Map<String, Object> attributes, Preferences preferences)

The upsert operation is used to add a new instance or to update an instance of a record in NetSuite.

Protected Methods
void addFields(RecordTypeEnum recordType, DynamicObjectBuilder<?> dynamicObject, DefaultPojoMetaDataModel fieldModel, List<CustomFieldRef> customFields)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

private static final String SUITETALK_LIVE_ADDRESS

Constant Value: "https://webservices.na1.netsuite.com/services/NetSuitePort_2013_2"

Fields

private NetSuiteClientImpl client

The Netsuite client to use. Mainly for mocking purposes

private String connectionId

The login email of both NetSuite UI and SuiteTalk

private static List<String> customKey

private String defaultEndpoint

Service endpoint

    Supports:
  • Live: https://webservices.netsuite.com/services/NetSuitePort_2013_2
  • Sandbox: https://webservices.sandbox.netsuite.com/services/NetSuitePort_2013_2
Defaults to Live

private static final Logger logger

Public Constructors

public NetSuiteCloudConnector ()

Public Methods

public RecordRef addFile (RecordRef folderId, Map<String, Object> attributes, Object content, String fileName, Preferences preferences)

Creates a new file record.

This Processor is similar to addRecord, but is customized for simplifying local content passing.

Parameters
folderId The id of the folder record where to add this file
attributes The additional file attributes
content The content of the file record to add. It can be of type String, byte array, File or InputStream. If it is an input stream, this Processors also closes it.
fileName The name of the remote file
preferences Preferences for the request.
Returns
  • the RecordRef of the new record
Throws
IOException if the content cannot be parsed to byte[]
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.
InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

public List<WriteResponse> addList (String recordType, List<Map<String, Object>> records, Preferences preferences)

Used to add one or more records into the system

Parameters
recordType The type of record to add
records The records with their attributes, as a string-object map
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public BaseRef addRecord (String recordType, Map<String, Object> attributes, Preferences preferences)

Creates a new record.

Example:

Parameters
recordType The type of record to add
attributes The record attributes, as a string-object map
preferences Preferences of the request
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

public List<WriteResponse> addRecordObjects (List<? extends Record> records)

Creates new records

Example:

Parameters
records The Records object
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public AsyncStatusResult asyncAddList (RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to addRecord(String, Map, Preferences).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
recordType The target record type.
recordsAttributes A list of Map containing the attributes of the records that will be added.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncDeleteList (List<BaseRefType> records, Preferences preferences)

An asynchronous requests equivalent to #deleteList(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
records A list of BaseRefType that references the objects to be deleted.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncDeleteListRecords (List<RecordRef> records, Preferences preferences)

An asynchronous requests equivalent to #deleteList(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
records A list of RecordRef that references the objects to be deleted.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncGetList (List<BaseRefType> records, Preferences preferences)

An asynchronous requests equivalent to #getList(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
records A list of RecordRef that references the objects to be retrieved.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncGetListRecords (List<RecordRef> records, Preferences preferences)

An asynchronous requests equivalent to #getList(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
records A list of RecordRef that references the objects to be retrieved.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncInitializeList (List<InitializeRecord> initializeRecord, Preferences preferences)

An asynchronous requests equivalent to #initializeRecord.

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
initializeRecord A list of RecordRef that references the objects to be retrieved.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncSearch (SearchRecordTypeEnum recordType, String expression, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

Searches for all records that match the given filtering expression, asynchronously.

If no expression is specified, all records of the given type are retrieved

Filtering expressions support both basic and joined syntax, that is, using in the filters attributes of both the target entity and the target entity associations. Advanced search is not supported.

Search expressions are in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used.

Examples:

Parameters
recordType The type of record to search
expression The filtering expression, in the form operator(attribute, arguments...) for basic search, and operator(join.attribute, arguments...) for joined search, where operator is any of the string, long, double, and text operators supported by SuiteTalk - MultiSelect operators are not supported - plus the isTrue/isFalse boolean operators, and arguments are zero up to three operands that depend on the operator used. Multiple filters can be combined using multiple predicates separated by commas.
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
  • the AsyncStatusResult of the query
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public AsyncStatusResult asyncUpdateList (RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to #updateRecord(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
recordType The target record type.
recordsAttributes A list of Map containing the attributes of the records that will be updated.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public AsyncStatusResult asyncUpsertList (RecordType recordType, List<Map<String, Object>> recordsAttributes, Preferences preferences)

An asynchronous requests equivalent to #upsertRecord(Map).

In asynchronous requests, your client application sends a request to the SuiteTalk Platform where it is placed in a processing queue and handled asynchronously with other requests. Note that all available jobs for each polling period will be processed contiguously. There is no enforced waiting period for a job that is available. Once a job is processed, a job ID is returned in the Web services response. Your client application can then check on the status and result of the request by referencing the job ID.

Note: Asynchronous request JobIDs are valid for 30 days.

Parameters
recordType The target record type.
recordsAttributes A list of Map containing the attributes of the records that will be inserted or updated.
preferences Preferences for the request.
Returns
  • The result AsyncStatusResult with the jobId that can be used to check the status and result.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public WriteResponse attachRecord (RecordRef source, RecordRef destination, RecordRef contact, RecordRef role, Preferences preferences)

Attaches a source or contact record - that is, the attachment - to another destination one

Not all record type are supported as source, destination or contact. Please consult NetSuite documentation.

Example:

Parameters
source An instance of RecordRef
destination An instance of RecordRef
contact An instance of RecordRef
role An instance of RecordRef
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public SessionResponse changeEmail (String newEmail, Boolean justThisAccount)

Use to change the email address for the account.

Parameters
newEmail Value for the new email.
justThisAccount Update email for just this account.
Returns
  • The result of the operation. See Status.
Throws
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
InsufficientPermissionFault InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.

public SessionResponse changePassword (String newPassword, Boolean justThisAccount)

Use to change the password for the account.

Parameters
newPassword New password value
justThisAccount Apply change just to this account.
Returns
  • The result of the operation. See Status.
Throws
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
InsufficientPermissionFault InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.

public AsyncStatusResult checkAsyncStatus (String jobId, Preferences preferences)

Answers the status of an asynchronous Web services submission.

When a jobId is submitted, the status, percent complete, and estimated remaining duration are returned.

Example:

Parameters
jobId The id of the job whose status to check.
preferences Preferences for the request.
Returns
  • the AsyncStatusResult for the given job
Throws
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
AsyncFault when error.

public void connect (String email, String password, String endpoint, String account, String roleId, Long connectionTimeout, Long receiveTimeout)

Connection Management connect method

Parameters
email The login email of both NetSuite UI and SuiteTalk
password The login password of both the NetSuite UI and SuiteTalk
endpoint Service endpoint
account SuiteTalk -NetSuite WebService - account id. It looks like TSTDRVXXXXXX
roleId The id of the role used to login in SuiteTalk, which determines the Processor privileges
connectionTimeout Specifies the amount of time, in milliseconds, that the client will attempt to establish a connection before it times out. The default is 30000 (30 seconds). 0 specifies that the client will continue to attempt to open a connection indefinitely.
receiveTimeout Specifies the amount of time, in milliseconds, that the client will wait for a response before it times out. The default is 60000. 0 specifies that the client will wait indefinitely.
Throws
ConnectionException

public String connectionId ()

Returns
  • the session id

public WriteResponse delete (BaseRefType baseRef, Preferences preferences)

Deletes a record. Not all records can be deleted. Please consult NetSuite documentation

Example:

Parameters
baseRef An instance of BaseRefType.
preferences Preferences for the request.
Returns
  • The result of the operation
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<WriteResponse> deleteList (List<BaseRefType> records, Preferences preferences)

Used to delete one or more records in the system. The records to be deleted are identified through the provided unique identifiers.

Parameters
records The records with their attributes, as a string-object map
preferences Preferences for the request.
Returns
  • A list of Record references for the deleted records
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public WriteResponse deleteRecord (RecordRef recordRef, Preferences preferences)

Deletes a record. Not all records can be deleted. Please consult NetSuite documentation

Example:

Parameters
recordRef An instance of RecordRef
preferences Preferences for the request.
Returns
  • The result of the operation
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<WriteResponse> deleteRecordsList (List<RecordRef> records, Preferences preferences)

Used to delete one or more records in the system. The records to be deleted are identified through the provided unique identifiers.

Parameters
records The records with their attributes, as a string-object map
preferences Preferences for the request.
Returns
  • A list of Record references for the deleted records
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public WriteResponse detachRecord (RecordRef source, RecordRef destination, Preferences preferences)

Detaches a source record - that is, the attachment - from a destination record.

Example:

Parameters
source An instance of RecordRef
destination An instance of RecordRef
preferences Preferences for the request.
Returns
  • DetachResponse object
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public void disconnect ()

Connection Management disconnect method

Throws
ConnectionException exception
Exception

public Map<String, Object> get (BaseRefType baseRef, Preferences preferences)

This is used to retrieve a record by providing the unique id that identifies that record.

Example:

Parameters
baseRef An instance of BaseRefType.
preferences Preferences for the request.
Returns
  • a Map that represents the Record you want to retrieve.
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

public AsyncResult getAsyncResult (String jobId, Integer pageIndex, Preferences preferences)

Answers the results of an asynchronous web services submission.

This Processor can be executed Processor up to 20 times within a 30 day time period to retrieve the results of an asynchronous job.

Example:

Parameters
jobId The id of the job
pageIndex The page number the the async result
preferences Preferences for the request.
Returns
  • An iterable with the Records found
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
AsyncFault when error

public GetBudgetExchangeRateResult getBudgetExchangeRates (RecordRef period, RecordRef fromSubsidiary, RecordRef toSubsidiary, Preferences preferences)

Answers the list of budget exchange rates

Example:

Parameters
period References an existing period.
fromSubsidiary References the receiving subsidiary.
toSubsidiary References the originating subsidiary.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public NetSuiteClient getClient ()

public GetConsolidatedExchangeRateResult getConsolidatedExchangeRates (RecordRef period, RecordRef fromSubsidiary, RecordRef toSubsidiary, Preferences preferences)

Answers the list of consolidated exchange rates

Example:

Parameters
period References an existing period.
fromSubsidiary References the receiving subsidiary.
toSubsidiary References the originating subsidiary.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public GetCurrencyRateResult getCurrentRate (CurrencyRateFilter rateFilter, Preferences preferences)

Use this operation to get the exchange rate between two currencies based on a certain date.

Parameters
rateFilter Filter the returned currency exchange rates using this filter.
preferences Preferences for the request.
Returns
  • The exchange rate.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public GetCustomizationIdResult getCustomizationIds (GetCustomizationType type, boolean includeInactives, Preferences preferences)

Answers the ids of available customizations for a given record type.

Example:

Parameters
type The target record type.
includeInactives If inactive customizations should also be returned.
preferences Preferences for the request.
Returns
  • a list of CustomizationRef's
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public GetDataCenterUrlsResult getDataCenterUrls (String accountId)

Use for dynamic discovery of data-center-specific URLs for partner applications’ access to NetSuite.

Parameters
accountId Netsuite account Id
Returns
  • Request The result containing the status and Data Center Urls.
Throws
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.

public String getDefaultEndpoint ()

public GetDeletedResult getDeletedRecords (RecordTypeEnum type, String whenExpression, Date date1, Date date2, SearchDateFieldOperatorEnum operator, Preferences preferences)

Answers a list of deleted records of a given record type that match a given date expression.

This Processors accepts two different date expression passing styles: string oriented, and object oriented. If whenExpression is specified, it is parsed and used as date expression. Otherwise, a date expression is build from date1, date2 and operator parameters.

The first style is more appropriate when the date expression can be harcdoded, while the second style is better when client code already has date objects. However, predefined search values like thisWeek, tomorrow or today can only be used with the first, string oriented, style.

String oriented date expressions are in the form Processor( searchValue, arguments...), where Processor is any of the NetSuite supported date Processors, arguments are one or two operands for the given operator, and searchValue is some of the supported predefined search value as defined by NetSuite or any of the following expressions:

  • isoDate( anIsoDate ), isoDateRante( anIsoDate, anotherIsoDate )
  • dateTime( aQuotedDateTime, aQuoatedJavaDateFormat )
  • dateTimeRange( aQuotedDateTime, anotherQuotedDateTime, aQuoatedJavaDateFormat )

Supported predefined search values are:

  • today
  • thisWeek
  • thisBusinessWeek
  • thisMonth
  • thisYear
  • yesterday
  • twoDaysAgo
  • lastWeek
  • lastMonth
  • threeMonthAgo
  • tomorrow
  • nextMonth
  • nextWeek

Examples using both string and object oriented styles:

Parameters
type The type of the target deleted record to retrieve
whenExpression A predicate-style date filtering expression
date1 The first date to use
date2 The second date to use
operator The date operator
preferences Preferences for the request.
Returns
  • the list of DeletedRecord's that match the given date filtering expression
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public GetItemAvailabilityResult getItemAvailability (RecordRef record, Date ifModifiedSince, Preferences preferences)

Answers the availability for a given record reference.

If the Multi-Location Inventory feature is enabled, this Processor returns results for all locations.

For locations that do not have any items available, only location IDs and names are listed in results.

Example:

Parameters
record An instance of RecordRef
ifModifiedSince An optional modified since date. If set, only items with quantity available changes recorded as of the specified date are returned.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<ReadResponse> getList (List<? extends BaseRef> references, Preferences preferences)

This operation is used to retrieve a list of objects referenced in the list of BaseRef object.

Example:

Parameters
references List of BaseRef child classes. Check BaseRef for a list of child classes.
preferences Preferences for the request.
Returns
  • the list of Record's
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public MetaData getMetaData (MetaDataKey key)

Parameters
key
Throws
Exception

public List<MetaDataKey> getMetaDataKeys ()

Throws
Exception

public GetPostingTransactionSummaryResult getPostingTransactionSummary (PostingTransactionSummaryField fields, PostingTransactionSummaryFilter filters, Integer pageIndex, Preferences preferences)

Use to retrieve a summary of the actual data in an account.

The getPostingTransactionSummary operation allows you to retrieve a summary of the actual data that posted to the general ledger in an account. You can use available filters/fields to generate reports that are similar to what you see when you run financial reports such as a Trial Balance, Balance Sheet, or an Income Statement.

Parameters
fields Specify how you want your data grouped.
filters Specify your filtering criteria.
pageIndex Specify the page to be returned.
preferences Preferences for the request.
Returns
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public Map<String, Object> getRecord (RecordRef recordRef, Preferences preferences)

This is used to retrieve a record by providing the unique id that identifies that record.

Example:

Parameters
recordRef An instance of RecordRef
preferences Preferences for the request.
Returns
  • a Map representing the Record.
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

public GetAllResult getRecords (GetAllRecordType type, Preferences preferences)

This operation is used to retrieve a list of all records of the specified type. Records that support the getAll operation are listed in the GetAllRecordType

Example:

Parameters
type The target record type
preferences Preferences for the request.
Returns
  • the list of Record's
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public GetSavedSearchResult getSavedSearch (RecordType type)

Retrieves a list of existing saved searches for the given record type.

Example:

Parameters
type The target record type
Returns
  • the list of RecordRedf's
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public GetSelectValueResult getSelectValue (int page, GetSelectValueFieldDescription fieldDescriptor, Preferences preferences)

Use to retrieve valid values for a given recordRef field where the referenced record type is not yet exposed in the Web services API or when the logged in role does not have permission to the instances of the record type.

Parameters
page For select values that span multiple pages, use this argument to specify which page to return in your response.
fieldDescriptor Use to specify all characteristics of the field containing the select values. For example, depending on the field and the values you want returned, you will specify the names or internalIds for the record type, sublist, and field. You may also specify filtering criteria to refine the select options returned in the response.
preferences Preferences for the request.
Returns
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public Date getServerTime ()

Answers the server time, resulting in more accurate and reliable sync'ing of data than using using local client time.

Example:

Returns
  • the server time, as a Date
Throws
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public ReadResponse initialize (InitializeRecord record, Preferences preferences)

Populates fields on transaction line items with values from a related record, in a similar way empty text boxes are prepopulated within the Netsuite UI

Example:

Parameters
record An instance of InitializeRecord
preferences Preferences for the request.
Returns
  • the initialized Record
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
IllegalAccessException Unexpected error.
IllegalArgumentException Invalid argument.

public List<ReadResponse> initializeList (List<InitializeRecord> initializeRecord, Preferences preferences)

Use to emulate the UI workflow by pre-populating fields on transaction line items with values from a related record. The initializeList operation can be used to run batch processes to retrieve initialized records.

Parameters
initializeRecord The list of InitializeRecord to initialize.
preferences Preferences for the request.
Returns
  • A list containing the results of each initialize request.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public boolean isConnected ()

public SessionResponse mapSso (String userAccount, String userPartnerId, String authenticationToken, String userEmail, String userPassword, RecordRef userRole)

Use to automate the mapping between external applications credentials and NetSuite’s credentials for a user.

This operation provides mapping, not a login to NetSuite. This operation does NOT provide the ability to log in using a single sign-on token, cannot provisian a partner with the inbound single sign-on feature, or aid with public/private key exchange. Use of this operation implies that the account already has inbound single sign-on set up and has access to the associated partner ID and encryption keys needed to generate the token.

Parameters
userAccount Account
userPartnerId This is the integration partner’s affiliate ID as provided to the partner by NetSuite.
authenticationToken This is a string representing the encrypted token.
userEmail Email
userPassword Password
userRole Role
Returns
  • Response which includes the status and wsRoleList elements. The wsRoleList element returns a list of roles available for the user specified in the passport.
Throws
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
InsufficientPermissionFault InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.

public SearchResult queryAsNativeResult (String query, boolean bodyFieldsOnly, Integer pageSize)

Return a list of records, or columns matching the query provided. You can also use the #queryRecords( String,boolean,Integer) queryRecords if you want direct access to the records as Maps.

Take into account that netsuite Record models doesn't match the models they use for search, so user will probably want to write some of the query by hand.

Parameters
query The query
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
pageSize Maximum amount of results per page
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public PagingDelegate<Map<String, Object>> queryRecords (String query, boolean bodyFieldsOnly, PagingConfiguration pagingConfiguration)

Return a list of records. This should only be used when you want to retrieve all the columns.

Take into account that netsuite Record models doesn't match the models they use for search, so user will probably want to write some of the query by hand.

Parameters
query The query
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
pagingConfiguration Page size
Returns
  • A list of Map that represents the records that matched the criteria.
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public SearchResult search (SearchRecordTypeEnum searchRecord, Map<String, Object> criteria, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The search operation is used to execute a search on a specific record type based on a set of criteria.

You can search by defining search filter fields on the record, joined fields on an associated record, search return columns, or joined search return columns from an associated record. The results of the search can be complete records, or a select set of fields specified through search return columns.

To get the values of a saved search you need to specify an ADVANCED record type:

Parameters
searchRecord The search type. See SearchRecordTypeEnum.
criteria A map that contains objects or maps describing the nested objects that define the SearchRecord object.
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public SearchResult searchMore (int pageIndex, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The seachMore operation is used to retrieve more records after an initial search operation.

The results returned in a searchMore operation reflect the records in the next segment as defined in the original search operation.

Parameters
pageIndex An index that specifies which page in the search to return.
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
  • A list of SearchResult with the results of the initial query in the specified page.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public SearchResult searchMoreWithId (String searchId, int pageIndex, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The searchMoreWithId operation allows users to reference a specific search result set by its searchId, a parameter included in all search results.

As with searchMore, users must set the pageIndex value to specify which page in the search to return.

Parameters
searchId The search result Id.
pageIndex An index that specifies which page in the search to return.
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
  • A list of SearchResult with the results of the initial query in the specified page.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public SearchResult searchNext (boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The searchNext operation is used to retrieve the next set of records after an initial search operation.

Parameters
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
  • A list of SearchResult corresponding to the next page of results.
Throws
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
ExceededUsageLimitFault No description at documentation for this exception.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.

public SearchResult searchWithExpression (SearchRecordTypeEnum searchRecord, String expression, boolean bodyFieldsOnly, boolean returnSearchColumns, Integer pageSize)

The search operation is used to execute a search on a specific record type based on a set of criteria.

You can search by defining search filter fields on the record, joined fields on an associated record, search return columns, or joined search return columns from an associated record. The results of the search can be complete records, or a select set of fields specified through search return columns.

This method should be used with Search record types that are not BASIC, nor ADVANCED record Types This is a basic search: To make a search with multienum: Joined searchs: You can create multiple conditions using comas to separate the expressions: You can also use some functions as shown bellow:

Parameters
searchRecord The search type. See SearchRecordTypeEnum.
expression The filtering expression Multiple filters can be combined using multiple predicates separated by commas.
bodyFieldsOnly Defaults to TRUE and indicates that the information in the body fields of the record are returned — significantly improving performance. Any fields in associated lists or sublists are not returned. If the bodyFieldsOnly field is set to FALSE, all fields associated with the record are returned.
returnSearchColumns Defaults to TRUE, meaning that only search columns will be returned in your search.
pageSize Maximum amount of results per page
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public void setDefaultEndpoint (String defaultEndpoint)

Parameters
defaultEndpoint

public SessionResponse ssoLogin (String partnerAccount, String partnerId, String authenticationToken)

Use to establish a single sign-on connection.

This operation allows for a partner application to login on behalf of the user in to NetSuite, without the user’s credentials ever going through partner servers.

Parameters
partnerAccount Partner Account
partnerId Partner Id
authenticationToken Token to use for authentication.
Returns
  • Response which includes the status and wsRoleList elements. The wsRoleList element returns a list of roles available for the user specified in the passport.
Throws
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
InsufficientPermissionFault InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.

public void updateCustomFieldsRecord (RecordType recordType, CustomFieldRefTypeEnum customFieldType, Map<String, Object> customFields, Preferences preferences)

Updates existing record's custom fields.

Example:

Parameters
recordType The target record type to update
customFieldType The type of custom field
customFields The custom fields as a map, where the key is the internalId
preferences Preferences for the request.
Throws
InvalidVersionFault This fault is thrown in the event that the request message contains an unsupported version of the schema.
InsufficientPermissionFault This fault is thrown when the client does not have the appropriate permissions to perform an action based on the role under which they are currently logged in. If the client (user) has more than one role, they may need to login again supplying a different role with more permissions.
InvalidAccountFault This fault is thrown when the client attempts to login with an invalid account id.
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public WriteResponse updateInviteeStatus (RecordRef eventId, CalendarEventAttendeeResponseEnum status, Preferences preferences)

Sets a new invitation status for a given event.

Example:

Parameters
eventId The target event id
status The new status to set
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<WriteResponse> updateInviteeStatusList (List<UpdateInviteeStatusReference> inviteeStatusList, Preferences preferences)

Sets a new invitation status for a given event.

Example:

Parameters
inviteeStatusList A list of the UpdateInviteeStatusReference items.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<WriteResponse> updateList (String recordType, List<Map<String, Object>> records, Preferences preferences)

Used to update one or more existing records in the system by providing new values for the fields to be updated for each record. The records to be updated are identified through the provided unique identifiers.

Parameters
recordType The type of record to add
records The records with their attributes, as a string-object map
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public BaseRef updateRecord (String recordType, Map<String, Object> attributes, Preferences preferences)

Updates an existing record.

Example:

Parameters
recordType The target record type to update
attributes The record attributes, as a string-object map, including internalId or externalId attribute.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

public List<WriteResponse> updateRecordsList (List<? extends Record> records, Preferences preferences)

Used to update one or more existing records in the system by providing a list of records. The records to be updated are identified through the provided unique identifiers.

NOTE: This call cannot be used with Data mapping or data sense, it was added to allow users to add a batch of records of any type in 1 call.

Parameters
records The records with their attributes.
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public List<WriteResponse> upsertList (String recordType, List<Map<String, Object>> records, Preferences preferences)

The upsertList operation is used to add or update one or more instances of a record type in NetSuite.

The upsertList operation is similar to both the addList and updateList operations, but upsert can be run without first determining whether records exist in NetSuite. Records are identified by their external ID and their record type. If a record of the specified type with a matching external ID exists in the system, it is updated. If it does not exist, a new record is created.

Because external ID is mandatory for this operation, upsertList is supported only for records that support the external ID field.

Also, this operation prohibits the passing of internal ID values.

Parameters
recordType The target record type to update
records The record attributes, as a string-object map
preferences Preferences for the request.
Returns
  • A list with the references to the upserted records
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.

public BaseRef upsertRecord (String recordType, String externalId, Map<String, Object> attributes, Preferences preferences)

The upsert operation is used to add a new instance or to update an instance of a record in NetSuite.

It is similar to the upsertList operation, which allows users to add or update more than one record at a time. The upsert operation is similar to both the add and update operations, but upsert can be run without first determining whether a record exists in NetSuite. A record is identified by its external ID and its record type. If a record of the specified type with a matching external ID exists in the system, it is updated. If it does not exist, a new record is created.

Because external ID is mandatory for this operation, upsert is supported only for records that support the external ID field.

Also, this operation prohibits the passing of internal ID values.

Parameters
recordType The target record type to update
externalId The target record id
attributes The record attributes, as a string-object map
preferences Preferences for the request.
Returns
Throws
ExceededRecordCountFault This fault is thrown in the event the maximum number of records allowed for an operation has been exceeded.
InvalidCredentialsFault This fault is thrown in the event of an invalid username (e-mail), password and/or role supplied in a login attempt.
UnexpectedErrorFault This fault is thrown in the event of an occurrence of an unexpected exception.
ExceededRequestSizeFault This fault is thrown if a request exceeds 10M.
ExceededRequestLimitFault This fault is thrown if the allowed number of concurrent requests is exceeded.
ExceededUsageLimitFault No description at documentation for this exception.
InvalidSessionFault This fault is thrown when the client’s session has timed out or was terminated as the result of a second Web services client establishing another session. The fault message occurs on the first request attempted after the session is terminated/timed out.
NetSuiteGenericException This fault is thrown when the request failed and it contains all the information related to the error.

Protected Methods

protected void addFields (RecordTypeEnum recordType, DynamicObjectBuilder<?> dynamicObject, DefaultPojoMetaDataModel fieldModel, List<CustomFieldRef> customFields)

Parameters
recordType
dynamicObject
fieldModel
customFields