Custom Transaction Supported Operations
The following operations can be used with custom transactions:
add | addList |attach / detach | delete | deleteList | get | getDeleted | getList | getSelectValue | search | update | updateList | upsert | upsertList
You can also use the asynchronous equivalents of SOAP web services list operations. For information about asynchronous operations, see SOAP Web Services Asynchronous Operations. For more information about request processing, see Synchronous Versus Asynchronous Request Processing.
Note the following:
-
When using the add or update operation, you use the tranType field to identify the transaction instance’s type. TranType is a RecordRef. Set the RecordRef’s internal ID to the appropriate value for the desired custom transaction type. For an example, see Example of Adding an Instance of a Basic Custom Transaction Type.
-
When using the attach operation, you can attach files only.
-
When using the get operation, you reference existing custom transaction instances by using CustomTransactionRef. This complex type is also used by the attach, delete, and detach operations. For an example, see Example of Getting a Custom Transaction.
-
When searching for custom transactions, you use the Transaction search objects: TransactionSearchBasic, TransactionSearch, and TransactionSearchAdvanced. When using TransactionSearchBasic to search for custom transaction instances, you can set the type field to _custom to retrieve custom transaction instances. To limit results to instances of a specific custom transaction type, use the RecordType field. Set this field to the value of the transaction type’s script ID.
-
In SOAP web services, the transaction status filter does not support statuses of custom transactions. This behavior is different from the UI, where the transaction status filter does support custom transactions’ statuses. To use custom transaction status to filter a SOAP web services search, you need to do the following:
-
Create a new custom transaction body field with a Type of List/Record, and a List/Record value of Transaction Status.
-
Create one or more user event scripts to store the proper value in the new transaction body field, and to apply this custom field to the transaction types for which you want to use this field to filter searches.
-
Run a mass update to set the value for existing records.
After these steps, SearchMultiSelectCustomField can be used as a filter in SOAP web services, as shown in the following code sample.
<ns8:customFieldList xsi:type="ns11:SearchCustomFieldList" smlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com"> <ns11:customField scriptId="custbody_st" operator="anyof" xsi:type="ns11:SearchMultiSelectCustomField"> <ns11:searchValue internalId="63" xsi:type="ns11:ListOrRecordRef" /> <ns11:searchValue internalId="10007" xsi:type="ns11:ListOrRecordRef"/> <ns11:searchValue internalId="86" xsi:type="ns11:ListOrRecordRef"/> </ns8:customFieldList>
You can use the getSelectValue operation to get the correct numbers for the filter, as shown in the following code sample.
<getSelectValue xmlns="urn:messages_2017_1.platform.webservices.netsuite.com"> <fieldDescription> <ns6:recordType xmlns:ns6=urn:core_2017_1.platform.webservices.netsuite.com">invoice</ns6:recordType> <ns7:field xmlns:ns7="urn:core_2017_1.platform.webservices.netsuite.com">custboty_st</ns7:field> </fieldDescription> <pageIndex>1</pageIndex> </getSelectValue>
-
Related Topics
- Custom Transaction
- Custom Transaction Body and Sublist Fields
- How List Styles Affect Your Integration
- About the CustomTransactionType Enum Value
- Custom Transaction Code Samples
- How to Use the SOAP Web Services Records Help
- SOAP Web Services Supported Records
- SOAP Schema Browser
- SuiteTalk SOAP Web Services Platform Overview