query.Type
JavaScript does not include an enumeration type. The SuiteScript 2.x 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 |
|
Sibling Module Members |
|
Since |
2018.1 |
Values
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 |
|
accountingbook |
|
accountingcontext |
|
accountingperiod |
|
activity |
|
addressbook |
|
advancednumberinglog |
|
advancedpdftemplate |
|
allparserplugin |
|
allocationmethod |
|
amortizationschedule |
|
amortizationtemplate |
|
authorizationconsent |
|
automatedclearinghouse |
|
balancingsegmentspreference |
|
billingclass |
|
billingratecard |
|
billingschedule |
|
billofdistribution |
|
billrun |
|
billrunschedule |
|
bin |
|
bom |
|
bomrevision |
|
bomrevisioncomponent |
|
budgetexchangerate |
|
budgetlegacy |
|
budgetcategory |
|
budgetimport |
|
budgets |
|
bulkprocsubmission |
|
bundleinstallationscript |
|
bundleinstallationscriptdeployment |
|
businesseventsprocessinghistory |
|
calendarevent |
|
campaignaudience |
|
campaigncategory |
|
campaignchannel |
|
campaignemailaddress |
|
campaignevent |
|
campaignfamily |
|
campaignoffer |
|
campaignresponse |
|
campaignsearchengine |
|
campaignsubscription |
|
campaigntemplate |
|
campaignvertical |
|
cardholderauthentication |
|
cardholderauthenticationevent |
|
category1099misc |
|
charge |
|
chargerule |
|
chargerun |
|
chargetype |
|
classification |
|
clientscript |
|
clientscriptdeployment |
|
companyfeaturesetup |
|
competitor |
|
consolidatedexchangerat |
|
consolidatedrateadjustorplugin |
|
contact |
|
contactcategory |
|
contactrole |
|
contactsubsidiaryrelationship |
|
costcategory |
|
couponcode |
|
currency |
|
currencyrate |
|
currencyratetype |
|
customsegmentfield |
|
customer |
|
customercategory |
|
customermessage |
|
customersegment |
|
customersubsidiaryrelationship |
|
customfield |
|
customfield2 |
|
customglplugin |
|
customlist |
|
customrecordactionscript |
|
customrecordtype |
|
customsegment |
|
customtransactiontype |
|
datasetbuilderplugin |
|
deletedrecord |
|
deletedrecordinconnect |
|
department |
|
deviceid |
|
distributioncategory |
|
distributionnetwork |
|
domain |
|
dual |
|
emailcaptureplugin |
|
emailtemplate |
|
employee |
|
employeeexpensesourcetype |
|
employeelist |
|
employeestatus |
|
employeesubsidiaryrelationship |
|
employeetype |
|
entity |
|
entitygroup |
|
entitysubsidiaryrelationship |
|
expensecategory |
|
expensereportpolicy |
|
faxtemplate |
|
file |
|
fiscalcalendar |
|
ficonnectivityplugin |
|
forecast |
|
formatprofile |
|
fulfillmentexceptionreason |
|
fulfillmentrequest |
|
fiparserplugin |
|
gatewaynotification |
|
generalallocationschedule |
|
generaltoken |
|
generalizeditem |
|
genericresource |
|
genericresourcesubsidiaryrelationship |
|
giftcertificate |
|
globalaccountmapping |
|
globalinventoryrelationship |
|
gllinesauditlog |
|
gllinespluginrevision |
|
glnumberingsequence |
|
importedemployeeexpense |
|
inboundshipment |
|
incoterm |
|
inventorycosttemplate |
|
inventorynumber |
|
inventorystatus |
|
invoicegroup |
|
invtitempricehistory |
|
issue |
|
issuepriority |
|
issueseverity |
|
issuestatus |
|
item |
|
itemaccountmapping |
|
itemcollection |
|
itemdemandplan |
|
itemlocationconfiguration |
|
itemprocessfamily |
|
itemprocessgroup |
|
itemsegmentcustomersegmentmap |
|
itemsegmentincludingsynthetic |
|
itemsupplyplan |
|
iprestrictions |
|
job |
|
jobresourcerole |
|
jobstatus |
|
jobtype |
|
knowledgebase |
|
location |
|
locationcostinggroup |
|
loginaudit |
|
mailtemplate |
|
manufacturingcomponent |
|
manufacturingcosttemplate |
|
manufacturingoperationtask |
|
manufacturingrouting |
|
manufacturingtransaction |
|
mapreducescript |
|
mapreducescriptdeployment |
|
massupdatescript |
|
massupdatescriptdeployment |
|
mediaitemfolder |
|
memdoc |
|
memdoctransactiontemplate |
|
merchandisehierarchylevel |
|
merchandisehierarchynode |
|
merchandisehierarchyversion |
|
message |
|
mfgplannedtime |
|
nettingstatement |
|
nexus |
|
note |
|
oauth22clientcredentials |
|
ocrimportjob |
|
ocrimportjobreview |
|
ocrplugin |
|
onlinecaseform |
|
onlineformtemplate |
|
onlineleadform |
|
orderallocationstrategy |
|
orderreleaseline |
|
orderreservation |
|
ordertyperecord |
|
othername |
|
othernamecategory |
|
othernamesubsidiaryrelationship |
|
outboundrequest |
|
oauthtoken |
|
partner |
|
partnersubsidiaryrelationship |
|
paycheck |
|
paymentcard |
|
paymentcardsearchrecord |
|
paymentcardtoken |
|
paymentevent |
|
paymentgatewayplugin |
|
paymentinstrument |
|
paymentmethod |
|
paymentprocessingprofile |
|
aymentresultpreview |
|
payrollbatch |
|
payrollitem |
|
payrollitemgroup |
|
pdftemplate |
|
performancereviewscheduletalentdataset |
|
phonecall |
|
pickstrategy |
|
picktask |
|
picktaskinventorybalance |
|
plannedorder |
|
plannedstandardcost |
|
planningitemcategory |
|
planningitemgroup |
|
planningitemgroupsource |
|
planningrulegroup |
|
planningview |
|
platformextensionplugin |
|
plugintype |
|
plugintypeimpl |
|
portlet |
|
portletdeployment |
|
postingaccountactivity |
|
predictedrisktrainevalhistory |
|
pricelevel |
|
pricing |
|
pricinggroup |
|
pricingwithcustomers |
|
projectbudget |
|
projectexpensetype |
|
projectfinancials |
|
projecticchargerequest |
|
projectsubsidiaryrelationship |
|
projecttask |
|
projecttemplate |
|
projectemplatesubsidiaryrelationship |
|
promotionsplugin |
|
promotioncode |
|
prompt |
|
publishedsavedsearch |
|
quantitypricingschedule |
|
quota |
|
recentrecord |
|
recordactionscriptdeployment |
|
recsysalgorithm |
|
recsysanalyticsreport |
|
recsysanalyticsreportagg |
|
recsysblocklist |
|
recsysconversion |
|
recsyseligibility |
|
recsysscenario |
|
redirect |
|
resourceallocation |
|
resourcegroup |
|
restlet |
|
restletdeployment |
|
retirementplan |
|
revrecschedule |
|
revrectemplate |
|
revenueelement |
|
role |
|
saleschannel |
|
salesrole |
|
salesinvoiced |
|
salesordered |
|
salestaxitem |
|
scheduledscript |
|
scheduledscriptdeployment |
|
scheduledscriptinstance |
|
script |
|
scriptcustomrecordtype |
|
scriptdeployment |
|
scriptnote |
|
scriptrecordtype |
|
searchcampaign |
|
sentemail |
|
shippingpackage |
|
shippingpartnerregistration |
|
shippingpartnersplugin |
|
shipitem |
|
shoppingcart |
|
sitecategory |
|
sitetheme |
|
solution |
|
standardcostversion |
|
state |
|
statisticaljournalentry |
|
statisticalschedule |
|
storepickupfulfillment |
|
storetab |
|
sublist |
|
subsidiary |
|
subsidiarysettings |
|
suitelet |
|
suiteletdeployment |
|
suitescriptdetail |
|
supplychainsnapshot |
|
supplychainsnapshotsimulation |
|
supplychangeorder |
|
supplyplandefinition |
|
supportcase |
|
supportcasepriority |
|
supportcasestatus |
|
systememailtemplate |
|
systemnote |
|
systemnote2 |
|
systemnotefield |
|
systemnotetype |
|
task |
|
taskitemstatus |
|
taxcalculationplugin |
|
taxitemtaxgroup |
|
taxtype |
|
term |
|
testplugin |
|
textenhanceaction |
|
timebill |
|
timemodificationrequest |
|
timesheet |
|
topic |
|
trackingnumber |
|
transaction |
|
transactionaddressbook |
|
transactionappliedruleslog |
|
transactionbilling |
|
transactionbillingaddressbook |
|
transactiondeletionreason |
|
transactionhistory |
|
transactionnumberingauditlog |
|
transactionpayeeaddressbook |
|
transactionreturnaddressbook |
|
transactionshippingaddressbook |
|
transactionstatus |
|
usrsnapshot |
|
umdfield |
|
undeliveredemail |
|
unitstype |
|
unlockedtimeperiod |
|
userauthorizationconsent |
|
usereventscript |
|
usereventscriptdeployment |
|
useroauthtoken |
|
usrsavedsearch |
|
usrauditlog |
|
usrdsauditlog |
|
usrdsexecutionlog |
|
usrexecutionlog |
|
vendor |
|
vendorcategory |
|
vendorsubsidiaryrelationship |
|
webapp |
|
website |
|
workbookbuilderplugin |
|
workflowactionscript |
|
workflowactionscriptdeployment |
|
workplace |
|
workcalendar |
|
wbs |
|
zone |
Syntax
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