tragicwhale
06/12/2018, 11:09 PMdarrenhillconsulting
06/12/2018, 11:17 PMsuperkumario64
06/12/2018, 11:30 PMsuperkumario64
06/12/2018, 11:30 PMmySearch.run().each.promise
?stalbert
06/12/2018, 11:31 PMsuperkumario64
06/12/2018, 11:31 PMstalbert
06/12/2018, 11:31 PMsuperkumario64
06/12/2018, 11:31 PMstalbert
06/12/2018, 11:32 PMsuperkumario64
06/12/2018, 11:32 PMsuperkumario64
06/12/2018, 11:35 PMvar customerSearch = s.create({
type: s.Type.CUSTOMER,
filters: [{
name: "companyname",
operator: s.Operator.CONTAINS,
values: [context.request.search]
}],
columns: [{
name: "companyname"
},
{
name:"internalid"
}]
});
function postResultsToCFWEB(result) {
aff.push({
"id": result.getValue({name: "id"}),
"name": result.getValue({name: "companyname"})
});
return true;
}
customerSearch.run().each(postResultsToCFWEB);
I’m getting this now: An nlobjSearchFilter contains an invalid operator, or is not in proper syntax: companyname.
superkumario64
06/12/2018, 11:36 PMstalbert
06/12/2018, 11:37 PMstalbert
06/12/2018, 11:38 PMsuperkumario64
06/12/2018, 11:38 PMfilters: [{
name: "companyname",
operator: s.Operator.CONTAINS,
value: context.request.search
}],
stalbert
06/12/2018, 11:38 PM['companyname', s.Operator.CONTAINS, context.request.search]
stalbert
06/12/2018, 11:39 PMsuperkumario64
06/12/2018, 11:41 PM{
"type": "error.SuiteScriptError",
"name": "SSS_INVALID_SRCH_OPERATOR",
"message": "An nlobjSearchFilter contains an invalid operator, or is not in proper syntax: companyname.",
"stack": [
"each(N/searchObject)",
"onRequest(/SuiteScripts/repo/suitelets/Search.js:29)"
],
"cause": {
"type": "internal error",
"code": "SSS_INVALID_SRCH_OPERATOR",
"details": "An nlobjSearchFilter contains an invalid operator, or is not in proper syntax: companyname.",
"userEvent": null,
"stackTrace": [
"each(N/searchObject)",
"onRequest(/SuiteScripts/repo/suitelets/Search.js:29)"
],
"notifyOff": false
},
"id": "",
"notifyOff": false
}
PabloZ
06/13/2018, 12:15 AMstalbert
06/13/2018, 12:25 AMcontext.request.search
if nothing else, so you can be sure it has a proper string valuestalbert
06/13/2018, 12:25 AMmichoel
06/13/2018, 12:27 AMcontext.request.parameters.search
?jake
06/13/2018, 6:38 AMmichoel
06/13/2018, 6:45 AMjake
06/13/2018, 7:40 AMaba
06/13/2018, 9:30 AMsamyt
06/13/2018, 1:07 PMsamyt
06/13/2018, 1:11 PMscrenshaw
06/13/2018, 1:13 PMsamyt
06/13/2018, 1:15 PM