Kris Wood
02/07/2020, 10:05 PMjkabot
02/07/2020, 11:38 PMconst filterExprCopy = mrr_np.filterExpression;
// modify your copy using push etc;
mrr_np.filterExpression = filterExprCopy; // now it will use your new filters
This is because, last I checked, NetSuite implemented filterExpression as a getter / setter of an internal private array, rather than direct access to it.
The getter produces a copy of that array.
So if you just do
mrr_np.filterExpression.push(...)
that is only working on the copy and not the internal array.jkabot
02/07/2020, 11:39 PMKris Wood
02/07/2020, 11:58 PM