Example of Adding a Sales Custom Transaction Type

In the following example the add operation is used for a sales custom transaction.

Java

            CustomSaleItem item = new CustomSaleItem();
item.setItem(createRecordRef("39"));

CustomSaleItemList itemList = new CustomSaleItemList();
itemList.setItem(new CustomSaleItem[] {item});

CustomSale record = new CustomSale();
record.setTranType(createRecordRef("105"));
record.setEntity(createRecordRef("84"));
record.setLocation(createRecordRef("2"));
record.setItemList(itemList);

c.addRecord(record); 

          

SOAP Request

            <add xmlns="urn:messages_2019_2.platform.webservices.netsuite.com">
<record xsi:type="ns7:CustomSale" xmlns:ns7="urn:customization_2019_2.setup.webservices.netsuite.com">
<ns7:tranType internalId="105" xsi:type="ns8:RecordRef" xmlns:ns8="urn:core_2019_2.platform.webservices.
netsuite.com"/>
<ns7:entity internalId="84" xsi:type="ns9:RecordRef" xmlns:ns9="urn:core_2019_2.platform.webservices.netsuit
e.com"/>
<ns7:location internalId="2" xsi:type="ns10:RecordRef" xmlns:ns10="urn:core_2019_2.platform.webservices.
netsuite.com"/>
<ns7:itemList replaceAll="false" xsi:type="ns7:CustomSaleItemList">
<ns7:item xsi:type="ns7:CustomSaleItem">
<ns7:item internalId="39" xsi:type="ns11:RecordRef" xmlns:ns11="urn:core_2019_2.platform.webservices.
netsuite.com"/>
</ns7:item>
</ns7:itemList>
</record>
</add> 

          

SOAP Response

            <addResponse xmlns="urn:messages_2019_2.platform.webservices.netsuite.com">
<writeResponse>
<platformCore:status isSuccess="true" xmlns:platformCore="urn:core_2019_2.platform.webservices.netsuite.
com">
<platformCore:statusDetail>
<platformCore:afterSubmitFailed>false</platformCore:afterSubmitFailed>
</platformCore:statusDetail>
</platformCore:status>
<baseRef internalId="176" type="customSale" xsi:type="platformCore:RecordRef" xmlns:platformCore="urn:core_
2019_2.platform.webservices.netsuite.com"/>
</writeResponse>
</addResponse> 

          

Related Topics

Custom Transaction
Sales and Purchase Custom Transaction Types
Custom Transaction Supported Operations
Custom Transaction Body and Sublist Fields
How List Styles Affect Your Integration
Custom Transaction Code Samples
Example of Getting a Custom Transaction
Example of Adding an Instance of a Basic Custom Transaction Type
How to Use the SOAP Web Services Records Help
SOAP Web Services Supported Records
SOAP Schema Browser
SuiteTalk SOAP Web Services Platform Overview

General Notices