Is there a generic way to get the name of a record...
# suitescript
j
Is there a generic way to get the name of a record, e.g. for Contact/Employee/Customer it would be ‘entityid’, for transactions it would be ‘tranid’, for Cases it is ‘casenumber’? Basically the name that appears in bold text in the UI, the name that appears in Global Search, or would be the BUILTIN.DF value in a SuiteQL foreign key.
d
there's some articles about this, let me see if I can find them
Not the article I was remembering though
j
hmm
that’s fine for customrecords but doesn’t help for standard records
👀 1
d
To be honest, I don't think I understand what you're after. I can't reconcile your examples
Don't think I understand this properly, hoping someone else in #C29HQS63G can help
n
Ah you mean the field that contains the document number effectively? Sounded like you wanted the base record type at first read.
j
I mean the field that stores the “name” of each individual record e.g. each individual salesorder in our system, each support case, etc. In transactions, this is
tranid
, in support cases this is
casenumber
, in Contact/Customer/Vendor this is
entityid
etc
👍 1
the value of this field shows in bold at the top of the record in the User Interface
for custom records where “use name field” is ticked, this would be
name
👍 1