Skip to main content

Record Types

This reference lists all record.Type enum values available in SuiteScript 2.x. Use these when loading, creating, or searching records.

Using Record Types

// Using the enum
var salesOrder = record.load({
type: record.Type.SALES_ORDER,
id: 123
});

// Using string value (equivalent)
var salesOrder = record.load({
type: 'salesorder',
id: 123
});

Entity Records

EnumString ValueDescription
CONTACTcontactContact record
CUSTOMERcustomerCustomer record
EMPLOYEEemployeeEmployee record
LEADleadLead record
OTHER_NAMEothernameOther name record
PARTNERpartnerPartner record
PROSPECTprospectProspect record
VENDORvendorVendor record

Transaction Records

EnumString ValueDescription
ASSEMBLY_BUILDassemblybuildAssembly build
ASSEMBLY_UNBUILDassemblyunbuildAssembly unbuild
BLANKET_PURCHASE_ORDERblanketpurchaseorderBlanket PO
CASH_REFUNDcashrefundCash refund
CASH_SALEcashsaleCash sale
CHECKcheckCheck/Cheque
CREDIT_CARD_CHARGEcreditcardchargeCredit card charge
CREDIT_CARD_REFUNDcreditcardrefundCredit card refund
CREDIT_MEMOcreditmemoCredit memo
CUSTOMER_DEPOSITcustomerdepositCustomer deposit
CUSTOMER_PAYMENTcustomerpaymentCustomer payment
CUSTOMER_REFUNDcustomerrefundCustomer refund
DEPOSITdepositDeposit
DEPOSIT_APPLICATIONdepositapplicationDeposit application
ESTIMATEestimateEstimate/Quote
EXPENSE_REPORTexpensereportExpense report
INTER_COMPANY_JOURNAL_ENTRYintercompanyjournalentryIntercompany journal
INVENTORY_ADJUSTMENTinventoryadjustmentInventory adjustment
INVENTORY_COUNTinventorycountInventory count
INVENTORY_TRANSFERinventorytransferInventory transfer
INVOICEinvoiceInvoice
ITEM_FULFILLMENTitemfulfillmentItem fulfillment
ITEM_RECEIPTitemreceiptItem receipt
JOURNAL_ENTRYjournalentryJournal entry
OPPORTUNITYopportunityOpportunity
PAYCHECKpaycheckPaycheck
PAYCHECK_JOURNALpaycheckjournalPaycheck journal
PERIOD_END_JOURNALperiodendjournalPeriod end journal
PURCHASE_CONTRACTpurchasecontractPurchase contract
PURCHASE_ORDERpurchaseorderPurchase order
PURCHASE_REQUISITIONpurchaserequisitionPurchase requisition
RETURN_AUTHORIZATIONreturnauthorizationReturn authorization
SALES_ORDERsalesorderSales order
TRANSFER_ORDERtransferorderTransfer order
VENDOR_BILLvendorbillVendor bill
VENDOR_CREDITvendorcreditVendor credit
VENDOR_PAYMENTvendorpaymentVendor payment
VENDOR_PREPAYMENTvendorprepaymentVendor prepayment
VENDOR_PREPAYMENT_APPLICATIONvendorprepaymentapplicationVendor prepayment application
VENDOR_RETURN_AUTHORIZATIONvendorreturnauthorizationVendor return auth
WORK_ORDERworkorderWork order
WORK_ORDER_CLOSEworkordercloseWork order close
WORK_ORDER_COMPLETIONworkordercompletionWork order completion
WORK_ORDER_ISSUEworkorderissueWork order issue

Item Records

EnumString ValueDescription
ASSEMBLY_ITEMassemblyitemAssembly item
DESCRIPTION_ITEMdescriptionitemDescription item
DISCOUNT_ITEMdiscountitemDiscount item
DOWNLOAD_ITEMdownloaditemDownload item
GIFT_CERTIFICATE_ITEMgiftcertificateitemGift certificate item
INVENTORY_ITEMinventoryitemInventory item
ITEM_GROUPitemgroupItem group
KIT_ITEMkititemKit item
LOT_NUMBERED_ASSEMBLY_ITEMlotnumberedassemblyitemLot numbered assembly
LOT_NUMBERED_INVENTORY_ITEMlotnumberedinventoryitemLot numbered inventory
MARKUP_ITEMmarkupitemMarkup item
NON_INVENTORY_ITEMnoninventoryitemNon-inventory item
OTHER_CHARGE_ITEMotherchargeitemOther charge item
PAYMENT_ITEMpaymentitemPayment item
SERIALIZED_ASSEMBLY_ITEMserializedassemblyitemSerialized assembly
SERIALIZED_INVENTORY_ITEMserializedinventoryitemSerialized inventory
SERVICE_ITEMserviceitemService item
SHIP_ITEMshipitemShip item
SUBTOTAL_ITEMsubtotalitemSubtotal item

Setup & Configuration Records

EnumString ValueDescription
ACCOUNTaccountAccount
ACCOUNTING_BOOKaccountingbookAccounting book
ACCOUNTING_PERIODaccountingperiodAccounting period
BINbinBin
BILLING_SCHEDULEbillingscheduleBilling schedule
CLASSIFICATIONclassificationClassification
CURRENCYcurrencyCurrency
DEPARTMENTdepartmentDepartment
LOCATIONlocationLocation
NEXUSnexusNexus
PRICE_LEVELpricelevelPrice level
SUBSIDIARYsubsidiarySubsidiary
TAX_GROUPtaxgroupTax group
TAX_PERIODtaxperiodTax period
TERMtermTerm
UNITS_TYPEunitstypeUnits type

CRM Records

EnumString ValueDescription
CALENDAR_EVENTcalendareventCalendar event
CAMPAIGNcampaignCampaign
CAMPAIGN_RESPONSEcampaignresponseCampaign response
CAMPAIGN_TEMPLATEcampaigntemplateCampaign template
COMPETITORcompetitorCompetitor
ISSUEissueIssue/Case
MESSAGEmessageMessage
NOTEnoteNote
PHONE_CALLphonecallPhone call
PROMOTION_CODEpromotioncodePromotion code
SUPPORT_CASEsupportcaseSupport case
TASKtaskTask
TOPICtopicTopic

Project & Resource Records

EnumString ValueDescription
JOBjobJob/Project
JOB_STATUSjobstatusJob status
JOB_TYPEjobtypeJob type
PROJECT_EXPENSE_TYPEprojectexpensetypeProject expense type
PROJECT_TASKprojecttaskProject task
PROJECT_TEMPLATEprojecttemplateProject template
RESOURCE_ALLOCATIONresourceallocationResource allocation
TIME_BILLtimebillTime bill
TIME_ENTRYtimeentryTime entry
TIME_SHEETtimesheetTime sheet

Scripting Records

EnumString ValueDescription
BUNDLE_INSTALLATION_SCRIPTbundleinstallationscriptBundle installation script
CLIENT_SCRIPTclientscriptClient script
MAP_REDUCE_SCRIPTmapreducescriptMap/Reduce script
MASSUPDATE_SCRIPTmassupdatescriptMass update script
RESTLETrestletRESTlet
SCHEDULED_SCRIPTscheduledscriptScheduled script
SCHEDULED_SCRIPT_INSTANCEscheduledscriptinstanceScheduled script instance
SCRIPT_DEPLOYMENTscriptdeploymentScript deployment
SUITELETsuiteletSuitelet
USEREVENT_SCRIPTusereventscriptUser event script
WORKFLOW_ACTION_SCRIPTworkflowactionscriptWorkflow action script

Custom Records

For custom record types, use the string ID:

var customRecord = record.load({
type: 'customrecord_myrecord',
id: 123
});

Usage Examples

Loading Records

// Load a customer
var customer = record.load({
type: record.Type.CUSTOMER,
id: 123,
isDynamic: true
});

// Load an invoice
var invoice = record.load({
type: record.Type.INVOICE,
id: 456
});

Creating Records

// Create a new sales order
var salesOrder = record.create({
type: record.Type.SALES_ORDER,
isDynamic: true
});

salesOrder.setValue({
fieldId: 'entity',
value: customerId
});

Searching Records

// Search for customers
var customerSearch = search.create({
type: search.Type.CUSTOMER,
filters: [
['isinactive', 'is', 'F']
],
columns: ['entityid', 'email', 'phone']
});

Deleting Records

// Delete a record
record.delete({
type: record.Type.SALES_ORDER,
id: 128
});