Anyway to get the Transaction record type from the...
# suitescript
a
Anyway to get the Transaction record type from the transaction? When you create a custom record and you create a field List/Record -> Transaction Type it holds or return the internal ID of the transaction type, for example 15 for Purchase Order... there is way to get that from a transaction? Query?
b
you can do a lookup where the type is transaction and the columns include the recordtype
a
Yes and that return
purchaseorder
which I can't use to do a search in my custom record using as a filter because the custom record Transaction Type uses internal ID numeric values and not the text...
I can read the transaction type from the transaction but a custom record with a custom field of Type: List/Record -> Transaction Type and value = Purchase Order holds or uses (15 (Purchase Order Transaction Type Internal ID))
I don't see a way to get transaction types numeric internal IDs, not even with the query module.
b
meh, i personally would hardcode it
if you really wanted to avoid it, the alternative is using the Transient Record Controller explained in the _SAFE guide_
its usually used to avoid a lookup, but it has the advantage in that it works on all fields, which can include things not supported by other apis
a
@battk Thanks, that document(PDF) is pretty good by the way...