Hey all, I’m trying to get the Text of Customer Fi...
# suitescript
a
Hey all, I’m trying to get the Text of Customer Field on a Sales Order Record via
record.getText('entity');
and I’m encountering the SSS_INVALID_API_USAGE error. Supposedly this is a documented bug(? feature?) and since it only occurs some of the time I’m wondering if there’s a better way to retrieve the Customer Name than switching to
record.getValue('entityname')
b
getText only works if the field was set via setText
a
I have it in a UserEvent Script that runs on Sales Order Creation events. In both CSV imports and UI creation it seems to works sometimes and fail other times.
b
its not the safe choice
use the entityname or lookup the name with a search using the internal id of getValue
a
Alright, I’m using entityname already so I think I stick with that.
Thanks for the tip!