Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
SuiteScript Suitelet Search Order By not working
I have a SuiteScript Suitelet with this search in it:
var itemfulfillmentSearchObj = search.create({
type: "itemfulfillment",
filters:
[
["type","anyof","ItemShip"],
"AND",
["trandate","within","today"],
"AND",
["location","anyof","2"],
"AND",
["mainline","any",""],
"AND",
["taxline","is","F"],
"AND",
["shipping","is","F"],
"AND",
["cogs","is","F"],
"AND",
["shipmethod","noneof","35"],
"AND",
["custbody_cust_pickedby","noneof","@NONE@"]
],
columns:
[
search.createColumn({
name: "formulatext",
summary: "GROUP",
formula: "{custbody_cust_pickedby}",
label: "Picked By"
}),
search.createColumn({
name: "tranid",
summary: "COUNT",
label: "Fulfilments"
}),
search.createColumn({
name: "lineuniquekey",
summary: "COUNT",
sort: search.Sort.DESC,
label: "Lines"
})
]
});
And this returns the results sorted correctly by the Count of the lineuniqukey column (from largest to smallest).
0