About the CustomTransactionType Enum Value

SOAP web services include a complex type to represent custom transactions, but not custom transaction types. What this means is that you can use SOAP web services to create, edit, or get custom transaction entries – instances of existing custom transaction types. However, you cannot create, edit, or get the types themselves. Custom transaction types can be created and edited only through the UI and SuiteBundler.

However, you must refer to custom transaction types when completing certain tasks in SOAP web services. To support these capabilities, the RecordType and GetCustomizationType enumerations each include customTransactionType as a value. You can use this value to accomplish tasks such as the following:

Get a List of Valid Custom Transaction Types

There may be times when you need to retrieve a list of valid custom transaction types that exist in your account. To retrieve this list, use the GetCustomizationType enumeration and the getCustomizationId operation, as shown in the following C# snippet:

          private void getCustomizationID()
{
   CustomizationType myType = new CustomizationType();
   myType.getCustomizationType = GetCustomizationType.customTransactionType;
   myType.getCustomizationTypeSpecified = true;

   GetCustomizationIdResult getCustId = _service.getCustomizationId(myType, false);
} 

        

In this example, the GetCustomizationType enumeration tells NetSuite which type of customization you need information about. In its response, the system returns a list of CustomizationRef objects, one for each custom transaction type that exists:

          <soapenv:Body>
   <getCustomizationIdResponse xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
      <platformCore:getCustomizationIdResult xmlns:platformCore="urn:core_2017_1.platform.webservices.netsuite.com">
         <platformCore:status isSuccess="true"/>
         <platformCore:totalRecords>2</platformCore:totalRecords>
         <platformCore:customizationRefList>
            <platformCore:customizationRef type="customTransactionType" internalId="100" scriptId="customtransaction_baddebt">
               <platformCore:name>Bad Debt</platformCore:name>
            </platformCore:customizationRef>
            <platformCore:customizationRef type="customTransactionType" internalId="101" scriptId="customtransaction_fixedassetdepreciation">
               <platformCore:name>Fixed Asset Depreciation</platformCore:name>
            </platformCore:customizationRef>
         </platformCore:customizationRefList>
      </platformCore:getCustomizationIdResult>
   </getCustomizationIdResponse>
</soapenv:Body> 

        

Create a Custom Transaction Instance

When you create a custom transaction instance, you can use the RecordType enumeration, as shown in the following snippet:

             RecordRef myCustTrxnType = new RecordRef();
   myCustTrxnType.type = RecordType.customTransactionType;
   myCustTrxnType.typeSpecified = true;
   myCustTrxnType.internalId = "100";
   myCustomTrxn.tranType = myCustTrxnType; 

        

In this example, the use of RecordType.customTransactionType tells the system that you are creating an instances of a custom transaction type. The internal ID value tells the system which specific custom transaction type you want to create an instance of.

For a full example of how to add a custom transaction instance, see Example of Adding an Instance of a Basic Custom Transaction Type.

Retrieve a List of Valid Values for a Field on a Custom Transaction Instance

When you create an instance of a custom transaction type, the entry form for the type may include a dropdown list. At times, you may need to retrieve a list of possible values for this type of field. You can retrieve this list by using the RecordType enumeration and the getSelectValue operation, as shown in the following snippet:

          private void getSelectValue()
{

CustomizationRef newRef = new CustomizationRef();
newRef.typeSpecified = true;
newRef.type = RecordType.customTransactionType;
newRef.internalId = "100";

GetSelectValueFieldDescription Request_fields = new GetSelectValueFieldDescription();
Request_fields.customTransactionType = newRef;
Request_fields.field = "subsidiary";
GetSelectValueResult result = _service.getSelectValue(Request_fields, 0);
BaseRef[] baseRef = result.baseRefList;

} 

        

In this example, note the following:

Related Topics

get
Custom Transaction
Custom Transaction Supported Operations
Custom Transaction Body and Sublist Fields
How List Styles Affect Your Integration
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

General Notices