Can we use custom body field as a filter?
# suiteql
n
Can we use custom body field as a filter?
j
Can you elaborate on this question?
n
I have a custom field on the sales order.
I want to query a sales order where that custom field has specific value.
I am getting invalid search query.
Search error occurred: Unknown identifier 'custbody_my_custom_field_id'
s
If the custom field type is Document, you will have issues. SuiteQL doesn’t seem to allow Document fields in either the select or where clauses yet
n
It is Integer
s
that should not usually be a problem
n
SELECT * FROM salesOrdered WHERE custbody_external_id = 1234;
Ohhh
I think I found the issue
salesOrdered is not valid type.
s
what about
SELECT * FROM transaction WHERE type = 'SalesOrd' AND custbody_external_id = 1234
j
👆
n
Yeah, that was the problem.
Thank you @scottvonduhn @jen
j
I did nothing but am happy to take half credit 😉
😆 1