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

This is not documented but from my experience it does work. However, I would not do it.

Advanced Answered on August 2, 2024.
Add Comment

Your Answer

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