Transaction Line Custom Field
Custom transaction line fields are fields that you can add to the line items of your transaction records to gather information specific to your business needs.
For more information, see Creating Custom Transaction Line Fields.
The transaction line custom field record is defined in the setupCustom (customization) XSD.
Supported Operations
The following operations can be used with transaction line custom field.
add | addList | delete | deleteList | get | getCustomizationId | getList | getSelectValue | 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.
Field Definitions
The SOAP Schema Browser includes definitions for all body fields, sublist fields, search filters, and search joins available to this record.
In the SOAP Schema Browser, this record is called transaction column custom field.
For details, see the SOAP Schema Browser’s transaction column custom field reference page.
For information about using the SOAP Schema Browser, see SOAP Schema Browser.
Code Sample
The following sample shows how to set transaction line custom fields.
SOAP
<soapenv:Body>
<add xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<record xsi:type="ns9:SalesOrder" xmlns:ns9="urn:sales_2017_1.transactions.webservices.netsuite.com"> <ns9:entity internalId="2" xsi:type="ns10:RecordRef" xmlns:ns10="urn:core_2017_1.platform.webservices.netsuite.com" />
<ns9:itemList replaceAll="false" xsi:type="ns9:SalesOrderItemList">
<ns9:item xsi:type="ns9:SalesOrderItem"> <ns9:item internalId="34" xsi:type="ns11:RecordRef" xmlns:ns11="urn:core_2017_1.platform.webservices.netsuite.com" /> <ns9:quantity xsi:type="xsd:double">3.0</ns9:quantity>
<ns9:customFieldList xsi:type="ns12:CustomFieldList" xmlns:ns12="urn:core_2017_1.platform.webservices.netsuite.com">
<ns12:customField scriptId="custcol_my_bool" xsi:type="ns12:BooleanCustomFieldRef"> <ns12:value xsi:type="xsd:boolean">true</ns12:value> </ns12:customField>
<ns12:customField scriptId="custcol_my_string" xsi:type="ns12:StringCustomFieldRef"> <ns12:value xsi:type="xsd:string">hello world</ns12:value> </ns12:customField>
<ns12:customField scriptId="custcol_my_integer" xsi:type="ns12:LongCustomFieldRef"> <ns12:value xsi:type="xsd:long">100</ns12:value> </ns12:customField> </ns9:customFieldList> </ns9:item> </ns9:itemList> </record> </add> </soapenv:Body>
Java
SalesOrder so = new SalesOrder();
RecordRef entityRef = new RecordRef();
entityRef.setType(RecordType.customer);
entityRef.setInternalId("2");
so.setEntity(entityRef);
SalesOrderItem soi = new SalesOrderItem();
RecordRef itemRef = new RecordRef();
itemRef.setType(RecordType.inventoryItem);
itemRef.setInternalId("34");
soi.setItem(itemRef);
soi.setQuantity(new Double(3));
BooleanCustomFieldRef cf1 = new BooleanCustomFieldRef(true, "custcol_my_bool");
StringCustomFieldRef cf2 = new StringCustomFieldRef("hello world", "custcol_my_string");
LongCustomFieldRef cf3 = new LongCustomFieldRef(100, "custcol_my_integer");
soi.setCustomFieldList(new CustomFieldList(new CustomFieldRef[]{cf1, cf2, cf3}));
so.setItemList(new SalesOrderItemList(new SalesOrderItem[]{soi}, true));