Anyone know what i could add to the SELECT to retu...
# suiteql
k
Anyone know what i could add to the SELECT to return the record type of the FROM to the rows returned?
c
Where do you want the record type? As a separate results column, or as a prefix on the result column names, or just in the query text?
k
Im using rest suiteql to return me records in JSON form. But to make it complete so I don’t have to modify the object I want to return the record type as a column in the data returned.
c
Are you trying to do this for all various types of records? Can you hard-code it, so if for example you're running an item query, you could do:
Copy code
SELECT
 ...
 'item' AS recordtype
FROM item
k
Hmmm if you can do that then yeah I have the string of the record type. Yeah various record types as creating a dynamic call to a fetch request.
b
If you're creating the query dynamically do you already have an input with the record type that could be added as a literal in your select?