jkabot
08/22/2018, 6:12 PM'custrecord_123456_tran_payer'
instead of custrecord_${config.client.id}_tran_payer
there is a bug with the how server's javascript engine and the netsuite api treat concatenated stringsstalbert
08/22/2018, 9:43 PMstalbert
08/22/2018, 9:43 PMjkabot
08/22/2018, 9:59 PMjkabot
08/22/2018, 10:05 PMrequire(["N/search"], function(search) {
var dynamicValue = "foo";
var filterExpr = [
"formulanumeric: case when regexp_like({memo}, '(^|\\W)" + dynamicValue + "(\\W|$)') then 1 else 0 end",
"equalto",
"1"
];
log.debug({ title: typeof filterExpr[0] }); // string
log.debug({ title: typeof filterExpr[1] }); // string
// throws SSS_INVALID_SRCH_FILTER_EXPR_TYPE: Malformed search filter expression, first two elements must be strings.
search.create({
type: search.Type.SALES_ORDER,
filters: filterExpr,
});
var x = 0;
});
stalbert
08/22/2018, 10:09 PMjkabot
08/23/2018, 2:35 PMcurrentRecord.getValue({ fieldId: 'custrecord_myrecord_' + month + '_quantity' }) // SSS_MISSING_REQD_ARGUMENT
I believe it has something to do with how NetSuite passes the java model of your javascript parameters to its underlying java implementation