https://netsuiteprofessionals.com logo
s

Shawn Talbert

05/04/2022, 2:52 PM
Most code I see here should be
const
, not
var
or
let
👍 2
z

Zoran R-DATAGRAM

05/04/2022, 2:55 PM
How do you understand this
Copy code
const rec=context.record;
rec.setValue(...);
s

scottvonduhn

05/04/2022, 2:58 PM
const variables cannot be reassigned, but const does not mean immutable
z

Zoran R-DATAGRAM

05/04/2022, 3:06 PM
Yes, I understand that, just point to an confused situation (at least for me)... Don't get me wrong, since 2.1 I usually use const for record object. But, sometimes I like to make difference between "read-only" constant and variable objects. I agree with @Shawn Talbert most suitescriot code could be const instead let and var
d

dbarnett

05/04/2022, 3:49 PM
3 Views