RE: 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!

jzankowski Rookie Asked on July 25, 2024 in SuiteScript.
Add Comment
2 Answers

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

Rookie Answered on August 5, 2024.

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…

on August 5, 2024.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.