c c
07/26/2021, 6:17 AMvar KeyValueobj = {
"Stainless steel plate EN 1.4301 0-3mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_03b2000w,
"Stainless steel plate EN 1.4301 0-3mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_03s2000w,
"Stainless steel plate EN 1.4301 0-3mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_03e2000w,
"Stainless steel plate EN 1.4301 4-12mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_412b2000w,
"Stainless steel plate EN 1.4301 4-12mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_412s2000w,
"Stainless steel plate EN 1.4301 4-12mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_412e2000w,
"Stainless steel plate EN 1.4301 >15mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_15b2000w,
"Stainless steel plate EN 1.4301 >15mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_15s2000w,
"Stainless steel plate EN 1.4301 >15mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_1403_15e2000w,
"Stainless steel plate EN 1.4401 >15mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_15b2000w,
"Stainless steel plate EN 1.4401 >15mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_15s2000w,
"Stainless steel plate EN 1.4401 >15mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_15e2000w,
"Stainless steel plate EN 1.4401 0-3mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_03b2000w,
"Stainless steel plate EN 1.4401 0-3mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_03s2000w,
"Stainless steel plate EN 1.4401 0-3mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_03e2000w,
"Stainless steel plate EN 1.4401 4-12mm >2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_412b2000w,
"Stainless steel plate EN 1.4401 4-12mm <2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_412s2000w,
"Stainless steel plate EN 1.4401 4-12mm =2000mm wide": recordSetPricesItemObj.custrecordss_p_14401_412e2000w,
}; I'm searching through a record's fields in NetSuite and then I get their values and then pair those values with the correct field name.
I have created this test:
if (bomItem.displayname == "Stainless steel plate 1.4301/1.4307 t=10 EN 10088") {
log.debug("CHECK1 : " + bomItem.custitem12)
log.debug("CHECK2 : " + parseFloat(KeyValueobj["Stainless steel plate EN 1.4301 4-12mm >2000mm wide"]).toFixed(2))
log.debug("CHECK3 : " + parseFloat(KeyValueobj[bomItem.custitem12]).toFixed(2))
log.debug(bomItem.custitem12 == "Stainless steel plate EN 1.4301 4-12mm >2000mm wide")
}
Results:
check1 = "Stainless steel plate EN 1.4301 4-12mm >2000mm wide"
check2 = 26
check3 = NaN
check = false
This makes no sense in my head, why when I compare 2 identical strings they are not equal?
I have tried to check for whitespaces or test with regex and deleted all whitespaces then compared and still == false..
I have also tried this:
log.debug("CHECK6 : " + parseFloat(KeyValueobj[bomItem["custitem12"]]).toFixed(2));
I'm experiencing this bug on those display names. Can someone help?
I have tried using toString(), Stringify(), deleting all whitespaces with regex, tried to use normalize, also tried using unescape()battk
07/26/2021, 6:34 AMbattk
07/26/2021, 6:35 AMc c
07/26/2021, 7:17 AMc c
07/26/2021, 7:17 AMc c
07/26/2021, 7:17 AMc c
07/26/2021, 7:17 AMc c
07/26/2021, 7:17 AMc c
07/26/2021, 7:18 AMc c
07/26/2021, 7:18 AMc c
07/26/2021, 7:18 AMc c
07/26/2021, 7:18 AMc c
07/26/2021, 7:18 AMc c
07/26/2021, 7:20 AMbattk
07/26/2021, 7:22 AMc c
07/26/2021, 7:22 AMc c
07/26/2021, 7:23 AMbattk
07/26/2021, 7:24 AMbattk
07/26/2021, 7:24 AMc c
07/26/2021, 7:25 AMc c
07/26/2021, 7:25 AMc c
07/26/2021, 7:25 AMc c
07/26/2021, 7:25 AMc c
07/26/2021, 7:25 AMbattk
07/26/2021, 7:25 AMc c
07/26/2021, 7:28 AMc c
07/26/2021, 7:28 AMc c
07/26/2021, 7:28 AMc c
07/26/2021, 7:29 AMc c
07/26/2021, 7:29 AMc c
07/26/2021, 7:29 AMc c
07/26/2021, 7:29 AMbattk
07/26/2021, 7:30 AMbattk
07/26/2021, 7:30 AMc c
07/26/2021, 7:30 AMbattk
07/26/2021, 7:30 AMc c
07/26/2021, 7:31 AMc c
07/26/2021, 7:31 AMc c
07/26/2021, 7:32 AMbattk
07/26/2021, 7:32 AMc c
07/26/2021, 7:32 AMbattk
07/26/2021, 7:33 AMc c
07/26/2021, 7:33 AMc c
07/26/2021, 7:33 AMbattk
07/26/2021, 7:34 AMbattk
07/26/2021, 7:34 AMc c
07/26/2021, 7:37 AMc c
07/26/2021, 7:37 AMc c
07/26/2021, 7:37 AMc c
07/26/2021, 7:37 AMc c
07/26/2021, 7:37 AMc c
07/26/2021, 7:38 AMc c
07/26/2021, 7:40 AMc c
07/26/2021, 7:40 AMc c
07/26/2021, 7:40 AMbattk
07/26/2021, 8:03 AMc c
07/26/2021, 8:13 AMc c
07/26/2021, 8:14 AMCD
07/26/2021, 11:36 AMc c
07/26/2021, 11:36 AMc c
07/26/2021, 11:37 AMc c
07/26/2021, 11:39 AMc c
07/26/2021, 11:40 AM