The Now Platform® Washington DC release is live. Watch now!
05-08-2018 01:35 AM
Hi all,
I think that this question is very simple for an expert developer, but for me it generate a big confusion.
when i prepare an "if" [condition] inside a script based on an hypothetical field storen in a table of the system is better use:
Best Regards
Vincenzo
Solved! Go to Solution.
05-08-2018 10:44 AM
So there are different ways to check if field value is null or undefined or false
1) If you want to look for undefined or null or nil or false, you can use JSUtil.nil(recordReference.fieldName)
2) If you are looking for null / nil check only, you can also use gs.nil() method
3) Already pointed in this thread 🙂
Hope above reply assist you now and in future !!!
05-08-2018 01:38 AM
Are you looking for valid field or field with valid value ( not null ? )
05-08-2018 01:52 AM
05-08-2018 10:44 AM
So there are different ways to check if field value is null or undefined or false
1) If you want to look for undefined or null or nil or false, you can use JSUtil.nil(recordReference.fieldName)
2) If you are looking for null / nil check only, you can also use gs.nil() method
3) Already pointed in this thread 🙂
Hope above reply assist you now and in future !!!
05-15-2018 05:19 AM
Hi, nil() is good, ok but i write this simple function JS code. Enjoy.