query.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 query types used in the query definition. This enum is used to pass the initial query type argument to query.create(options).

Important:

The N/query module supports the same record types that are supported by the SuiteAnalytics Workbook interface. For more information, see Available Record Types.

Module

N/query Module

Sibling Module Members

N/query Module Members

Since

2018.1

Values

Note:

Before using these values, consider the following:

  • A query type is not the same as a record type. The supported query types listed below do not necessarily correspond with the supported record types listed in the N/record Module.

  • Depending on your account, role, and enabled features, some of these values may not be available.

  • Custom record types are not included in this enum.

  • You must configure your account settings according to the query type used in your scripts to avoid potential errors.

Enum Value

Sets Query.type Property To

ACCOUNT

account

ACCOUNTING_BOOK

accountingbook

ACCOUNTING_CONTEXT

accountingcontext

ACCOUNTING_PERIOD

accountingperiod

ACTIVITY

activity

ADDRESS_BOOK

addressbook

ADVANCED_NUMBERING_LOG

advancednumberinglog

ADVANCED_PDF_TEMPLATE

advancedpdftemplate

ALL_PARSER_PLUGIN

allparserplugin

ALLOCATION_METHOD

allocationmethod

AMORTIZATION_SCHEDULE

amortizationschedule

AMORTIZATION_TEMPLATE

amortizationtemplate

AUTHORIZATION_CONSENT

authorizationconsent

AUTOMATED_CLEARING_HOUSE

automatedclearinghouse

BALANCING_SEGMENTS_PREFERENCE

balancingsegmentspreference

BILLING_CLASS

billingclass

BILLING_RATE_CARD

billingratecard

BILLING_SCHEDULE

billingschedule

BILL_OF_DISTRIBUTION

billofdistribution

BILL_RUN

billrun

BILL_RUN_SCHEDULE

billrunschedule

BIN

bin

BOM

bom

BOM_REVISION

bomrevision

BOM_REVISION_COMPONENT

bomrevisioncomponent

BUDGET_EXCHANGE_RATE

budgetexchangerate

BUDGET_LEGACY

budgetlegacy

BUDGETCATEGORY

budgetcategory

BUDGETIMPORT

budgetimport

BUDGETS

budgets

BULK_PROC_SUBMISSION

bulkprocsubmission

BUNDLE_INSTALLATION_SCRIPT

bundleinstallationscript

BUNDLE_INSTALLATION_SCRIPT_DEPLOYMENT

bundleinstallationscriptdeployment

BUSINESS_EVENTS_PROCESSING_HISTORY

businesseventsprocessinghistory

CALENDAR_EVENT

calendarevent

CAMPAIGN_AUDIENCE

campaignaudience

CAMPAIGN_CATEGORY

campaigncategory

CAMPAIGN_CHANNEL

campaignchannel

CAMPAIGN_EMAIL_ADDRESS

campaignemailaddress

CAMPAIGN_EVENT

campaignevent

CAMPAIGN_FAMILY

campaignfamily

CAMPAIGN_OFFER

campaignoffer

CAMPAIGN_RESPONSE

campaignresponse

CAMPAIGN_SEARCH_ENGINE

campaignsearchengine

CAMPAIGN_SUBSCRIPTION

campaignsubscription

CAMPAIGN_TEMPLATE

campaigntemplate

CAMPAIGN_VERTICAL

campaignvertical

CARDHOLDER_AUTHENTICATION

cardholderauthentication

CARDHOLDER_AUTHENTICATION_EVENT

cardholderauthenticationevent

CATEGORY1099MISC

category1099misc

CHARGE

charge

CHARGE_RULE

chargerule

CHARGE_RUN

chargerun

CHARGE_TYPE

chargetype

CLASSIFICATION

classification

CLIENT_SCRIPT

clientscript

CLIENT_SCRIPT_DEPLOYMENT

clientscriptdeployment

COMPANY_FEATURE_SETUP

companyfeaturesetup

COMPETITOR

competitor

CONSOLIDATED_EXCHANGE_RATE

consolidatedexchangerat

CONSOLIDATED_RATE_ADJUSTOR_PLUGIN

consolidatedrateadjustorplugin

CONTACT

contact

CONTACT_CATEGORY

contactcategory

CONTACT_ROLE

contactrole

CONTACT_SUBSIDIARY_RELATIONSHIP

contactsubsidiaryrelationship

COST_CATEGORY

costcategory

COUPON_CODE

couponcode

CURRENCY

currency

CURRENCY_RATE

currencyrate

CURRENCY_RATE_TYPE

currencyratetype

CUSTOM_SEGMENT_FIELD

customsegmentfield

CUSTOMER

customer

CUSTOMER_CATEGORY

customercategory

CUSTOMER_MESSAGE

customermessage

CUSTOMER_SEGMENT

customersegment

CUSTOMER_SUBSIDIARY_RELATIONSHIP

customersubsidiaryrelationship

CUSTOM_FIELD

customfield

CUSTOM_FIELD_2

customfield2

CUSTOM_GL_PLUGIN

customglplugin

CUSTOM_LIST

customlist

CUSTOM_RECORD_ACTION_SCRIPT

customrecordactionscript

CUSTOM_RECORD_TYPE

customrecordtype

CUSTOM_SEGMENT

customsegment

CUSTOM_TRANSACTION_TYPE

customtransactiontype

DATASET_BUILDER_PLUGIN

datasetbuilderplugin

DELETED_RECORD

deletedrecord

DELETED_RECORD_IN_CONNECT

deletedrecordinconnect

DEPARTMENT

department

DEVICE_ID

deviceid

DISTRIBUTION_CATEGORY

distributioncategory

DISTRIBUTION_NETWORK

distributionnetwork

DOMAIN

domain

DUAL

dual

EMAIL_CAPTURE_PLUGIN

emailcaptureplugin

EMAIL_TEMPLATE

emailtemplate

EMPLOYEE

employee

EMPLOYEE_EXPENSE_SOURCE_TYPE

employeeexpensesourcetype

EMPLOYEE_LIST

employeelist

EMPLOYEE_STATUS

employeestatus

EMPLOYEE_SUBSIDIARY_RELATIONSHIP

employeesubsidiaryrelationship

EMPLOYEE_TYPE

employeetype

ENTITY

entity

ENTITY_GROUP

entitygroup

ENTITY_SUBSIDIARY_RELATIONSHIP

entitysubsidiaryrelationship

EXPENSE_CATEGORY

expensecategory

EXPENSE_REPORT_POLICY

expensereportpolicy

FAX_TEMPLATE

faxtemplate

FILE

file

FISCAL_CALENDAR

fiscalcalendar

FI_CONNECTIVITY_PLUGIN

ficonnectivityplugin

FORECAST

forecast

FORMAT_PROFILE

formatprofile

FULFILLMENT_EXCEPTION_REASON

fulfillmentexceptionreason

FULFILLMENT_REQUEST

fulfillmentrequest

F_I_PARSER_PLUGIN

fiparserplugin

GATEWAY_NOTIFICATION

gatewaynotification

GENERAL_ALLOCATION_SCHEDULE

generalallocationschedule

GENERAL_TOKEN

generaltoken

GENERALIZED_ITEM

generalizeditem

GENERIC_RESOURCE

genericresource

GENERIC_RESOURCE_SUBISIDIARY_RELATIONSHIP

genericresourcesubsidiaryrelationship

GIFT_CERTIFICATE

giftcertificate

GLOBAL_ACCOUNT_MAPPING

globalaccountmapping

GLOBAL_INVENTORY_RELATIONSHIP

globalinventoryrelationship

GL_LINES_AUDIT_LOG

gllinesauditlog

GL_LINES_PLUGIN_REVISION

gllinespluginrevision

G_L_NUMBERING_SEQUENCE

glnumberingsequence

IMPORTED_EMPLOYEE_EXPENSE

importedemployeeexpense

INBOUND_SHIPMENT

inboundshipment

INCOTERM

incoterm

INVENTORY_COST_TEMPLATE

inventorycosttemplate

INVENTORY_NUMBER

inventorynumber

INVENTORY_STATUS

inventorystatus

INVOICE_GROUP

invoicegroup

INVT_ITEM_PRICE_HISTORY

invtitempricehistory

ISSUE

issue

ISSUE_PRIORITY

issuepriority

ISSUE_SEVERITY

issueseverity

ISSUE_STATUS

issuestatus

ITEM

item

ITEM_ACCOUNT_MAPPING

itemaccountmapping

ITEM_COLLECTION

itemcollection

ITEM_DEMAND_PLAN

itemdemandplan

ITEM_LOCATION_CONFIGURATION

itemlocationconfiguration

ITEM_PROCESS_FAMILY

itemprocessfamily

ITEM_PROCESS_GROUP

itemprocessgroup

ITEM_SEGMENT_CUSTOMER_SEGMENT_MAP

itemsegmentcustomersegmentmap

ITEM_SEGMENT_INCLUDING_SYNTHETIC

itemsegmentincludingsynthetic

ITEM_SUPPLY_PLAN

itemsupplyplan

I_P_RESTRICTIONS

iprestrictions

JOB

job

JOB_RESOURCE_ROLE

jobresourcerole

JOB_STATUS

jobstatus

JOB_TYPE

jobtype

KNOWLEDGE_BASE

knowledgebase

LOCATION

location

LOCATION_COSTING_GROUP

locationcostinggroup

LOGIN_AUDIT

loginaudit

MAIL_TEMPLATE

mailtemplate

MANUFACTURING_COMPONENT

manufacturingcomponent

MANUFACTURING_COST_TEMPLATE

manufacturingcosttemplate

MANUFACTURING_OPERATION_TASK

manufacturingoperationtask

MANUFACTURING_ROUTING

manufacturingrouting

MANUFACTURING_TRANSACTION

manufacturingtransaction

MAP_REDUCE_SCRIPT

mapreducescript

MAP_REDUCE_SCRIPT_DEPLOYMENT

mapreducescriptdeployment

MASS_UPDATE_SCRIPT

massupdatescript

MASS_UPDATE_SCRIPT_DEPLOYMENT

massupdatescriptdeployment

MEDIA_ITEM_FOLDER

mediaitemfolder

MEM_DOC

memdoc

MEM_DOC_TRANSACTION_TEMPLATE

memdoctransactiontemplate

MERCHANDISE_HIERARCHY_LEVEL

merchandisehierarchylevel

MERCHANDISE_HIERARCHY_NODE

merchandisehierarchynode

MERCHANDISE_HIERARCHY_VERSION

merchandisehierarchyversion

MESSAGE

message

MFG_PLANNED_TIME

mfgplannedtime

NETTING_STATEMENT

nettingstatement

NEXUS

nexus

NOTE

note

O_AUTH2_CLIENT_CREDENTIALS

oauth22clientcredentials

OCR_IMPORT_JOB

ocrimportjob

OCR_IMPORT_JOB_REVIEW

ocrimportjobreview

OCR_PLUGIN

ocrplugin

ONLINE_CASE_FORM

onlinecaseform

ONLINE_FORM_TEMPLATE

onlineformtemplate

ONLINE_LEAD_FORM

onlineleadform

ORDER_ALLOCATION_STRATEGY

orderallocationstrategy

ORDER_RELEASE_LIN

orderreleaseline

ORDER_RESERVATION

orderreservation

ORDER_TYPE_RECORD

ordertyperecord

OTHER_NAME

othername

OTHER_NAME_CATEGORY

othernamecategory

OTHER_NAME_SUBSIDIARY_RELATIONSHIP

othernamesubsidiaryrelationship

OUTBOUND_REQUEST

outboundrequest

O_AUTH_TOKEN

oauthtoken

PARTNER

partner

PARTNER_SUBSIDIARY_RELATIONSHIP

partnersubsidiaryrelationship

PAYCHECK

paycheck

PAYMENT_CARD

paymentcard

PAYMENT_CARD_SEARCH_RECORD

paymentcardsearchrecord

PAYMENT_CARD_TOKEN

paymentcardtoken

PAYMENT_EVENT

paymentevent

PAYMENT_GATEWAY_PLUGIN

paymentgatewayplugin

PAYMENT_INSTRUMENT

paymentinstrument

PAYMENT_METHOD

paymentmethod

PAYMENT_PROCESSING_PROFILE

paymentprocessingprofile

PAYMENT_RESULT_PREVIEW

aymentresultpreview

PAYROLL_BATCH

payrollbatch

PAYROLL_ITEM

payrollitem

PAYROLL_ITEM_GROUP

payrollitemgroup

PDF_TEMPLATE

pdftemplate

PERFORMANCE_REVIEW_SCHEDULE_TALENT_DATASET

performancereviewscheduletalentdataset

PHONE_CALL

phonecall

PICK_STRATEGY

pickstrategy

PICK_TASK

picktask

PICK_TASK_INVENTORY_BALANCE

picktaskinventorybalance

PLANNED_ORDER

plannedorder

PLANNED_STANDARD_COST

plannedstandardcost

PLANNING_ITEM_CATEGORY

planningitemcategory

PLANNING_ITEM_GROUP

planningitemgroup

PLANNING_ITEM_GROUP_SOURCE

planningitemgroupsource

PLANNING_RULE_GROUP

planningrulegroup

PLANNING_VIEW

planningview

PLATFORM_EXTENSION_PLUGIN

platformextensionplugin

PLUG_IN_TYPE

plugintype

PLUG_IN_TYPE_IMPL

plugintypeimpl

PORTLET

portlet

PORTLET_DEPLOYMENT

portletdeployment

POSTING_ACCOUNT_ACTIVITY

postingaccountactivity

PREDICTED_RISK_TRAIN_EVAL_HISTORY

predictedrisktrainevalhistory

PRICE_LEVEL

pricelevel

PRICING

pricing

PRICING_GROUP

pricinggroup

PRICING_WITH_CUSTOMERS

pricingwithcustomers

PROJECT_BUDGET

projectbudget

PROJECT_EXPENSE_TYPE

projectexpensetype

PROJECT_FINANCIALS

projectfinancials

PROJECT_IC_CHARGE_REQUEST

projecticchargerequest

PROJECT_SUBSIDIARY_RELATIONSHIP

projectsubsidiaryrelationship

PROJECT_TASK

projecttask

PROJECT_TEMPLATE

projecttemplate

PROJECT_TEMPLATE_SUBSIDIARY_RELATIONSHIP

projectemplatesubsidiaryrelationship

PROMOTIONS_PLUGIN

promotionsplugin

PROMOTION_CODE

promotioncode

PUBLISHED_SAVED_SEARCH

publishedsavedsearch

QUANTITY_PRICING_SCHEDULE

quantitypricingschedule

QUOTA

quota

RECENT_RECORD

recentrecord

RECORD_ACTION_SCRIPT_DEPLOYMENT

recordactionscriptdeployment

REC_SYS_ALGORITHM

recsysalgorithm

REC_SYS_ANALYTICS_REPORT

recsysanalyticsreport

REC_SYS_ANALYTICS_REPORT_AGG

recsysanalyticsreportagg

REC_SYS_BLOCKLIST

recsysblocklist

REC_SYS_CONVERSION

recsysconversion

REC_SYS_ELIGIBILITY

recsyseligibility

REC_SYS_SCENARIO

recsysscenario

REDIRECT

redirect

RESOURCE_ALLOCATION

resourceallocation

RESOURCE_GROUP

resourcegroup

RESTLET

restlet

RESTLET_DEPLOYMENT

restletdeployment

RETIREMENT_PLAN

retirementplan

REV_REC_SCHEDULE

revrecschedule

REV_REC_TEMPLATE

revrectemplate

REVENUE_ELEMENT

revenueelement

ROLE

role

SALES_CHANNEL

saleschannel

SALES_ROLE

salesrole

SALES_INVOICED

salesinvoiced

SALES_ORDERED

salesordered

SALES_TAX_ITEM

salestaxitem

SCHEDULED_SCRIPT

scheduledscript

SCHEDULED_SCRIPT_DEPLOYMENT

scheduledscriptdeployment

SCHEDULED_SCRIPT_INSTANCE

scheduledscriptinstance

SCRIPT

script

SCRIPT_CUSTOM_RECORD_TYPE

scriptcustomrecordtype

SCRIPT_DEPLOYMENT

scriptdeployment

SCRIPT_NOTE

scriptnote

SCRIPT_RECORD_TYPE

scriptrecordtype

SEARCH_CAMPAIGN

searchcampaign

SENT_EMAIL

sentemail

SHIPPING_PACKAGE

shippingpackage

SHIPPING_PARTNER_REGISTRATION

shippingpartnerregistration

SHIPPING_PARTNERS_PLUGIN

shippingpartnersplugin

SHIP_ITEM

shipitem

SHOPPING_CART

shoppingcart

SITE_CATEGORY

sitecategory

SITE_THEME

sitetheme

SOLUTION

solution

STANDARD_COST_VERSION

standardcostversion

STATE

state

STATISTICAL_JOURNAL_ENTRY

statisticaljournalentry

STATISTICAL_SCHEDULE

statisticalschedule

STORE_PICKUP_FULFILLMENT

storepickupfulfillment

STORE_TAB

storetab

SUBLIST

sublist

SUBSIDIARY

subsidiary

SUBSIDIARY_SETTINGS

subsidiarysettings

SUITELET

suitelet

SUITELET_DEPLOYMENT

suiteletdeployment

SUITE_SCRIPT_DETAIL

suitescriptdetail

SUPPLY_CHAIN_SNAPSHOT

supplychainsnapshot

SUPPLY_CHAIN_SNAPSHOT_SIMULATION

supplychainsnapshotsimulation

SUPPLY_CHANGE_ORDER

supplychangeorder

SUPPLY_PLAN_DEFINITION

supplyplandefinition

SUPPORT_CASE

supportcase

SUPPORT_CASE_PRIORITY

supportcasepriority

SUPPORT_CASE_STATUS

supportcasestatus

SYSTEM_EMAIL_TEMPLATE

systememailtemplate

SYSTEM_NOTE

systemnote

SYSTEM_NOTE2

systemnote2

SYSTEM_NOTE_FIELD

systemnotefield

TAG

tag

TASK

task

TASK_ITEM_STATUS

taskitemstatus

TAX_CALCULATION_PLUGIN

taxcalculationplugin

TAX_ITEM_TAX_GROUP

taxitemtaxgroup

TAX_TYPE

taxtype

TERM

term

TEST_PLUGIN

testplugin

TIME_BILL

timebill

TIME_MODIFICATION_REQUEST

timemodificationrequest

TIME_SHEET

timesheet

TOPIC

topic

TRACKING_NUMBER

trackingnumber

TRANSACTION

transaction

TRANSACTION_ADDRESSBOOK

transactionaddressbook

TRANSACTION_APPLIED_RULES_LOG

transactionappliedruleslog

TRANSACTION_BILLING

transactionbilling

TRANSACTION_BILLING_ADDRESSBOOK

transactionbillingaddressbook

TRANSACTION_DELETION_REASON

transactiondeletionreason

TRANSACTION_HISTORY

transactionhistory

TRANSACTION_NUMBERING_AUDIT_LOG

transactionnumberingauditlog

TRANSACTION_PAYEE_ADDRESSBOOK

transactionpayeeaddressbook

TRANSACTION_RETURN_ADDRESSBOOK

transactionreturnaddressbook

TRANSACTION_SHIPPING_ADDRESSBOOK

transactionshippingaddressbook

TRANSACTION_STATUS

transactionstatus

U_S_R_SNAPSHOT

usrsnapshot

UMD_FIELD

umdfield

UNDELIVERED_EMAIL

undeliveredemail

UNITS_TYPE

unitstype

UNLOCKED_TIME_PERIOD

unlockedtimeperiod

USER_AUTHORIZATION_CONSENT

userauthorizationconsent

USER_EVENT_SCRIPT

usereventscript

USER_EVENT_SCRIPT_DEPLOYMENT

usereventscriptdeployment

USER_O_AUTH_TOKEN

useroauthtoken

USRSAVEDSEARCH

usrsavedsearch

USR_AUDIT_LOG

usrauditlog

USR_DS_AUDIT_LOG

usrdsauditlog

USR_DS_EXECUTION_LOG

usrdsexecutionlog

USR_EXECUTION_LOG

usrexecutionlog

VENDOR

vendor

VENDOR_CATEGORY

vendorcategory

VENDOR_SUBSIDIARY_RELATIONSHIP

vendorsubsidiaryrelationship

WEBAPP

webapp

WEB_SITE

website

WORKBOOK_BUILDER_PLUGIN

workbookbuilderplugin

WORKFLOW_ACTION_SCRIPT

workflowactionscript

WORKFLOW_ACTION_SCRIPT_DEPLOYMENT

workflowactionscriptdeployment

WORKPLACE

workplace

WORK_CALENDAR

workcalendar

WBS

wbs

ZONE

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/query Module Script Samples.

            // Add additional code
...
var myCustomerQuery = query.create({ type: query.Type.CUSTOMER
}); var mySalesRepJoin = myCustomerQuery.autoJoin({ fieldId: 'salesrep'
}); var firstCondition = myCustomerQuery.createCondition({ fieldId: 'id', operator: query.Operator.EQUAL, values: 107
});
var secondCondition = myCustomerQuery.createCondition({ fieldId: 'id', operator: query.Operator.EQUAL, values: 2647
});
var thirdCondition = mySalesRepJoin.createCondition({ fieldId: 'email', operator: query.Operator.START_WITH_NOT, values: 'foo'
}); myCustomerQuery.condition = myCustomerQuery.and( thirdCondition, myCustomerQuery.or(firstCondition, secondCondition)
); var resultSet = myCustomerQuery.run();
...
// Add additional code 

          

Related Topics

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

General Notices