Is it safe to use Record.getValue() with a string parameter?
I see that Record.getValue() is described in the docs as taking an options object argument containing the property fieldId. However, I see that passing in a string containing the name of the field just works. I.e. this:
someRecord.getValue('some_field');
instead of
someRecord.getValue({ fieldId: 'some_field' });
Is the string version safe to use given I can’t find any documentation on it? Thanks!
This is not documented but from my experience it does work. However, I would not do it.
Following is the Local Format
someRecord.getValue('some_field');
This One is the Standard Format
someRecord.getValue({ fieldId: 'some_field' });
However, the working fuctionality is same for both you can use either of them
Thank you for answering, but to be honest, I don’t understand what you mean by “Local Format” vs “Standard Format”. Google searches
suitescript "local format" "standard format"
and
netsuite "local format" "standard format"
don’t return anything.
If you can clarify, that would be great. At the moment, I’m afraid it’s not a very helpful answer…



