Does anyone have wisdom to share on getting summar...
# suitescript
m
Does anyone have wisdom to share on getting summary results from a search? Here is what I am beating my head against...
b
what does the column used in the search look like
m
search.createColumn({ name: "custentity_project_period", join: "CUSTRECORD_PROJECT", summary: "GROUP", sort: search.Sort.DESC, label: "Period" }),
b
name, join, and summary should be keys in the object parameter for getText
alternatively you can pass in the column object itself into getText
m
I added join but it still doesn't return values 😕
m
Try adding the sort and label too.
b
var result_out = result.getValue(search.createColumn({ name: "custentity_project_period", join: "CUSTRECORD_PROJECT", summary: "GROUP", sort: search.Sort.DESC, label: "Period" }));
m
Ideally, you define your column and assign it to a variable, then retrieve it from that reference.
b
var result_out = result.getValue({ name: "custentity_project_period", join: "CUSTRECORD_PROJECT", summary: "GROUP", sort: search.Sort.DESC, label: "Period" }); though i dont think the sort and label are used
m
Okay, I will try passing in the other key/values and also the variable
Thanks btw
c
sort is used but label is not used
e
TLDR: your options for
createColumn()
and
getValue()
should basically match exactly, except for
label
as that's not relevant to
getValue()