superkumario64
05/29/2018, 10:48 PMvar lor_internalid = rec.getText({ "fieldId": "id"});
var customerSearch = s.create({
type: s.Type.CUSTOMER,
filters: [{
name: "category",
operator: s.Operator.ANYOF,
values: ["Affiliate"]
},
{
name: "custentity_lor",
operator: s.Operator.ANYOF,
values: [lor_internalid]
}],
columns: [{
name: "companyname"
},
{
name:"custentity_afid"
}]
});
log.debug("customerSearch", customerSearch);
customerSearch.run().each(printCustomerNameAndAid);
function printCustomerNameAndAid(result) {
log.debug(result.getValue({name: "companyname"}));
log.debug(result.getValue({name: "custentity_afid"}));
return true;
}
I’m getting an off error with this search: org.mozilla.javascript.EcmaError: TypeError: org.mozilla.javascript.Undefined@4df26817 is not a function, it is undefined. (/SuiteScripts/repo/userevents/Netsuite2WEB.js#59)
Anybody see any glaring issues?