Anyone know what i could add to the SELECT to return the record type of the FROM to the rows returned?
c
Clay Roper
05/16/2023, 2:11 PM
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
karlenigma
05/16/2023, 9:44 PM
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
Clay Roper
05/16/2023, 9:46 PM
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
karlenigma
05/17/2023, 5:53 AM
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
Ben Tanner
05/17/2023, 10:41 PM
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?