record.Type

Note:

The content in this help topic pertains to SuiteScript 2.0.

Note:

JavaScript does not include an enumeration type. The SuiteScript 2.0 documentation uses the term enumeration (or enum) to describe a plain JavaScript object with a flat, map-like structure. In this object, each key points to a read-only string value.

Enum Description

Holds the string values for supported record types. Use this enum to set the value of the Record.type property in cases where you are working with an instance of a standard NetSuite record type. If you are working with an instance of a custom record type, you set the Record.type property by using the custom record type’s string ID. For more help finding this ID, see Custom Record.

Note:

Some record types support default values. For more information, see record.create(options). For a list of available record default values, see N/record Default Values.

The following code samples demonstrate the difference between working with a standard NetSuite record type and a custom record type:

  • A standard NetSuite record type

                            var objRecord = record.delete({
        type: record.Type.SALES_ORDER, 
        id: 128
    }); 
    
                          
  • A custom record type

                            var objRecord = record.delete({
        type: 'customrecord_myrecord', 
        id: 22
    }); 
    
                          

Supported Script Types

Client and server scripts

For more information, see SuiteScript 2.x Script Types.

Module

N/record Module

Since

2015.2

Values

  • ACCOUNT

  • ACCOUNTING_BOOK

  • ACCOUNTING_CONTEXT

  • ACCOUNTING_PERIOD

  • ADV_INTER_COMPANY_JOURNAL_ENTRY

  • ALLOCATION_SCHEDULE

  • AMORTIZATION_SCHEDULE

  • AMORTIZATION_TEMPLATE

  • AS_CHARGED_PROJECT_REVENUE_RULE

  • ASSEMBLY_BUILD

  • ASSEMBLY_ITEM

  • ASSEMBLY_UNBUILD

  • BALANCE_TRX_BY_SEGMENTS

  • BILLING_ACCOUNT

  • BILLING_CLASS

  • BILLING_RATE_CARD

  • BILLING_REVENUE_EVENT

  • BILLING_SCHEDULE

  • BIN

  • BIN_TRANSFER

  • BIN_WORKSHEET

  • BLANKET_PURCHASE_ORDER

  • BOM

  • BOM_REVISION

  • BONUS

  • BONUS_TYPE

  • BUDGET_EXCHANGE_RATE

  • BULK_OWNERSHIP_TRANSFER

  • BUNDLE_INSTALLATION_SCRIPT

  • CALENDAR_EVENT

  • CAMPAIGN

  • CAMPAIGN_RESPONSE

  • CAMPAIGN_TEMPLATE

  • CASH_REFUND

  • CASH_SALE

  • CHARGE

  • CHARGE_RULE

  • CHECK

  • CLASSIFICATION

  • CLIENT_SCRIPT

  • CMS_CONTENT

  • CMS_CONTENT_TYPE

  • CMS_PAGE

  • COMMERCE_CATEGORY

  • COMPETITOR

  • CONSOLIDATED_EXCHANGE_RATE

  • CONTACT

  • CONTACT_CATEGORY

  • CONTACT_ROLE

  • COST_CATEGORY

  • COUPON_CODE

  • CREDIT_CARD_CHARGE

  • CREDIT_CARD_REFUND

  • CREDIT_MEMO

  • CURRENCY

  • CUSTOM_PURCHASE

  • CUSTOMER

  • CUSTOMER_CATEGORY

  • CUSTOMER_DEPOSIT

  • CUSTOMER_MESSAGE

  • CUSTOMER_PAYMENT

  • CUSTOMER_PAYMENT_AUTHORIZATION

  • CUSTOM_RECORD

  • CUSTOMER_REFUND

  • CUSTOMER_STATUS

  • CUSTOMER_SUBSIDIARY_RELATIONSHIP

  • CUSTOM_TRANSACTION

  • DEPARTMENT

  • DEPOSIT

  • DEPOSIT_APPLICATION

  • DESCRIPTION_ITEM

  • DISCOUNT_ITEM

  • DOWNLOAD_ITEM

  • EMAIL_TEMPLATE

  • EMPLOYEE

  • EMPLOYEE_CHANGE_REQUEST

  • EMPLOYEE_CHANGE_TYPE

  • ENTITY_ACCOUNT_MAPPING

  • ESTIMATE

  • EXPENSE_AMORTIZATION_EVENT

  • EXPENSE_CATEGORY

  • EXPENSE_PLAN

  • EXPENSE_REPORT

  • FAIR_VALUE_PRICE

  • FINANCIAL_INSTITUTION

  • FIXED_AMOUNT_PROJECT_REVENUE_RULE

  • FOLDER

  • FULFILLMENT_REQUEST

  • GENERAL_TOKEN

  • GENERIC_RESOURCE

  • GIFT_CERTIFICATE

  • GIFT_CERTIFICATE_ITEM

  • GLOBAL_ACCOUNT_MAPPING

  • GLOBAL_INVENTORY_RELATIONSHIP

  • GL_NUMBERING_SEQUENCE

  • GOAL

  • INBOUND_SHIPMENT

  • INTERCOMP_ALLOCATION_SCHEDULE

  • INTER_COMPANY_JOURNAL_ENTRY

  • INTER_COMPANY_TRANSFER_ORDER

  • INVENTORY_ADJUSTMENT

  • INVENTORY_COST_REVALUATION

  • INVENTORY_COUNT

  • INVENTORY_DETAIL

  • INVENTORY_ITEM

  • INVENTORY_NUMBER

  • INVENTORY_STATUS

  • INVENTORY_STATUS_CHANGE

  • INVENTORY_TRANSFER

  • INVOICE

  • ISSUE

  • ISSUE_PRODUCT

  • ISSUE_PRODUCT_VERSION

  • ITEM_ACCOUNT_MAPPING

  • ITEM_COLLECTION

  • ITEM_COLLECTION_ITEM_MAP

  • ITEM_DEMAND_PLAN

  • ITEM_FULFILLMENT

  • ITEM_GROUP

  • ITEM_LOCATION_CONFIGURATION

  • ITEM_PROCESS_FAMILY

  • ITEM_PROCESS_GROUP

  • ITEM_RECEIPT

  • ITEM_REVISION

  • ITEM_SUPPLY_PLAN

  • JOB

  • JOB_STATUS

  • JOB_TYPE

  • JOURNAL_ENTRY

  • KIT_ITEM

  • LABOR_ BASED_PROJECT_REVENUE_RULE

  • LEAD

  • LOCATION

  • LOT_NUMBERED_ASSEMBLY_ITEM

  • LOT_NUMBERED_INVENTORY_ITEM

  • MANUFACTURING_COST_TEMPLATE

  • MANUFACTURING_OPERATION_TASK

  • MANUFACTURING_ROUTING

  • MAP_REDUCE_SCRIPT

  • MARKUP_ITEM

  • MASSUPDATE_SCRIPT

  • MEM_DOC

  • MERCHANDISE_HIERARCHY_LEVEL

  • MERCHANDISE_HIERARCHY_NODE

  • MERCHANDISE_HIERARCHY_VERSION

  • MESSAGE

  • MFG_PLANNED_TIME

  • NEXUS

  • NON_INVENTORY_ITEM

  • NOTE

  • NOTE_TYPE

  • OPPORTUNITY

  • ORDER_SCHEDULE

  • OTHER_CHARGE_ITEM

  • OTHER_NAME

  • OTHER_NAME_CATEGORY

  • PARTNER

  • PARTNER_CATEGORY

  • PARTNER_COMMISSION_PLAN

  • PAYCHECK

  • PAYCHECK_JOURNAL

  • PAYMENT_CARD

  • PAYMENT_CARD_TOKEN

  • PAYMENT_ITEM

  • PAYMENT_METHOD

  • PAYROLL_ITEM

  • PCT_COMPLETE_PROJECT_REVENUE_RULE

  • PERFORMANCE_METRIC

  • PERFORMANCE_REVIEW

  • PERFORMANCE_REVIEW_SCHEDULE

  • PERIOD_END_JOURNAL

  • PHONE_CALL

  • PICK_STRATEGY

  • PICK_TASK

  • PORTLET

  • PRICE_BOOK

  • PRICE_LEVEL

  • PRICE_PLAN

  • PRICING_GROUP

  • PROJECT_EXPENSE_TYPE

  • PROJECT_TASK

  • PROJECT_TEMPLATE

  • PROMOTION_CODE

  • PROSPECT

  • PURCHASE_CONTRACT

  • PURCHASE_ORDER

  • PURCHASE_REQUISITION

  • REALLOCATE_ITEM

  • RECEIVE_INBOUND_SHIPMENT

  • RESOURCE_ALLOCATION

  • RESTLET

  • RETURN_AUTHORIZATION

  • REVENUE_ARRANGEMENT

  • REVENUE_COMMITMENT

  • REVENUE_COMMITMENT_REVERSAL

  • REVENUE_PLAN

  • REV_REC_SCHEDULE

  • REV_REC_TEMPLATE

  • SALES_ORDER

  • SALES_ROLE

  • SALES_TAX_ITEM

  • SCHEDULED_SCRIPT

  • SCHEDULED_SCRIPT_INSTANCE

  • SCRIPT_DEPLOYMENT

  • SERIALIZED_ASSEMBLY_ITEM

  • SERIALIZED_INVENTORY_ITEM

  • SERVICE_ITEM

  • SHIP_ITEM

  • SOLUTION

  • STATISTICAL_JOURNAL_ENTRY

  • STORE_PICKUP_FULFILLMENT

  • SUBSCRIPTION

  • SUBSCRIPTION_CHANGE_ORDER

  • SUBSCRIPTION_LINE

  • SUBSCRIPTION_PLAN

  • SUBSIDIARY

  • SUBSIDIARY_SETTINGS

  • SUBTOTAL_ITEM

  • SUITELET

  • SUPPLY_CHAIN_SNAPSHOT

  • SUPPLY_CHAIN_SNAPSHOT_SIMULATION

  • SUPPORT_CASE

  • TASK

  • TAX_ACCT

  • TAX_GROUP

  • TAX_PERIOD

  • TAX_TYPE

  • TERM

  • TIME_BILL

  • TIME_ENTRY

  • TIME_OFF_CHANGE

  • TIME_OFF_PLAN

  • TIME_OFF_REQUEST

  • TIME_OFF_RULE

  • TIME_OFF_TYPE

  • TIME_SHEET

  • TOPIC

  • TRANSFER_ORDER

  • UNITS_TYPE

  • UNLOCKED_TIME_PERIOD

  • USAGE

  • USEREVENT_SCRIPT

  • VENDOR

  • VENDOR_BILL

  • VENDOR_CATEGORY

  • VENDOR_CREDIT

  • VENDOR_PAYMENT

  • VENDOR_PREPAYMENT

  • VENDOR_PREPAYMENT_APPLICATION

  • VENDOR_RETURN_AUTHORIZATION

  • VENDOR_SUBSIDIARY_RELATIONSHIP

  • WAVE

  • WBS

  • WEBSITE

  • WORKFLOW_ACTION_SCRIPT

  • WORK_ORDER

  • WORK_ORDER_CLOSE

  • WORK_ORDER_COMPLETION

  • WORK_ORDER_ISSUE

  • WORKPLACE

  • ZONE

Syntax

Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/record Module Script Samples.

            // Add additional code.
...
var objRecord = record.delete({
    type: record.Type.SALES_ORDER, 
    id: 128
});
...    
// Add additional code. 

          

Related Topics

N/record Module
SuiteScript 2.x Modules
SuiteScript 2.x

General Notices