Hi All, I'm trying to get the company value from t...
# suiteql
c
Hi All, I'm trying to get the company value from the case record. Since, I need a value rather than I'd so I'm using BUILTIN.DF(supportcase.company) but unfortunately still it is returning id instead of text. Any ideas ?
s
By using @ here, you have just notified all active users in this channel. Please only use @ here when absolutely necessary.
c
@here Any thoughts? I tried joining the case and entity tables. Still I'm getting the id instead of name.
s
By using @ here, you have just notified all active users in this channel. Please only use @ here when absolutely necessary.
m
BUILTIN.DF should return the text as in the image
c
That's weird. I'm using the similar one but I'm getting id instead of text
m
is the entity setup with the id as the name?
c
Yes it is Matt.
m
that’s probably the issue. what is the actual name field used on the entity?
maybe it’s one of these fields? select company as company_id, BUILTIN.DF(supportCase.company) as company_text, entity.entityid, entity.lastname, entity.firstname, entity.email, entity.entitytitle, entity.entitynumber, from supportCase INNER JOIN entity ON supportCase.company = entity.id
c
Thanks Matt. I tried this but still I'm getting id. I would like to get the autogenerated Id in the entity record.
m
if it’s a custom field, try adding that custom field to entity.custfield…
c
No it's not a custom field. The id of that field is entityid.
m
and entityid is only returning the internalid of the record?
c
Yes even I tried using the BUILTIN.DF(entityid)
I'm excepting the text in the entityid
m
that’s odd… what happens if you try a direct query onto the entity record? Are you able to pull the text value at all? Maybe try a select * from entity WHERE entity.id IN (<<insert id>>)
c
Finally I got it 😊. Thanks for the idea! I tried getting all the values from the entity record and the correct value sits in the entitytitle column
🎉 1
Thanks @Matt Bernstein