Craig
02/19/2025, 6:26 AMvar rate_entered = nlapiGetCurrentLineItemValue('item', 'rate');
if (rate_entered.indexOf('%') > -1)
I'm seeing this SS1 code in one NetSuite instance which suggests a % can be entered into the rate line field. I am testing this in the UI and I can see that the if statement evals to true when I enter -50% in the rate field.
I wrote the below code in another NetSuite environment
const rateEntered = record.getCurrentSublistValue({
sublistId: SUBLIST_ID,
fieldId: RATE_FIELD
});
if (rateEntered && String(rateEntered).includes('%')) {
The SS2.1 if statement always evals to false when I enter -50% in the rate field.
I have checked the first rate field and it is NOT a custom field.
It looks like NS is removing the % before the data is passed to the SS2.1 script; is this somehow working differently in SS1?Craig
02/19/2025, 7:00 AMbattk
02/19/2025, 7:59 AMbattk
02/19/2025, 7:59 AMbattk
02/19/2025, 8:00 AMCraig
02/19/2025, 8:10 AM