Query.columns
Property Description |
An of result columns (query.Column objects) returned from the query. The query.Column object is the equivalent of the search.Column object in the N/search Module. The query.Column object describes a field type (column) that is returned from the query results. To create columns:
|
Type |
|
Module |
|
Parent Object |
|
Sibling Object Members |
|
Since |
2018.1 |
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'
});
myCustomerQuery.columns = [
myCustomerQuery.createColumn({
fieldId: 'entityid'
}),
mySalesRepJoin.createColumn({
fieldId: 'firstname'
}),
mySalesRepJoin.createColumn({
fieldId: 'email'
})
];
...
// Add additional code