7px
12/22/2021, 3:07 AMcustomermain.entityid
) using search.filterExpression
, yet when creating a saved search in SS2, adding that filter returns an error saying that it isn't a valid search criteria.
here's the code snippet of the search I made. maybe I missed something?
var stateSearch = search.create({
type: search.Type.TRANSACTION,
columns: [
{ name: 'ordertype' },
{ name: "mainline" },
{ name: "trandate" },
{ name: "tranid" },
{ name: "duedate" },
{ name: "amount" },
{ name: "type" }
],
filters: [{
name: "type",
operator: "anyof",
values: ["CustInvc"]
},
{
name: "mainline",
operator: "is",
values: ['T']
},
{
name: "customermain.entityid",
operator: "is",
values: ["Some Guy"]
},
{
name: "trandate",
operator: "within",
values: [startDateField, todayDateField]
}]
});
battk
12/22/2021, 3:17 AMbattk
12/22/2021, 3:17 AMbattk
12/22/2021, 3:19 AMbattk
12/22/2021, 3:21 AMcustomermain.entityid
is how you would specify a joined search filter in a filter expression, it wont work in a filter object7px
12/22/2021, 5:13 AMfilters: [
["type", search.Operator.ANYOF, "CustInvc"],
"and",
["mainline", <http://search.Operator.IS|search.Operator.IS>, "T"],
"and",
["customermain.entityid", <http://search.Operator.IS|search.Operator.IS>, "Some Guy"],
"and",
["trandate", search.Operator.ONORAFTER, startDateField],
"and",
["trandate", search.Operator.BEFORE, todayDateField]
]
Thanks again.