Hi all! :wave: Is it possible to query for purchas...
# suiteql
a
Hi all! šŸ‘‹ Is it possible to query for purchase orders through SuiteQL? Or is it only possible to access these records through the REST API? I tried querying for them using this query:
SELECT * FROM purchaseorders
but it did not work.
a
there isn't a purchaseorders table, there's a transaction table, and presumably a type column you can add to your where clause
a
I see. I tried querying
transactions
and it does have a
type
field, but the only value it takes is
vendBill
even though I’m pretty sure my instance has purchase orders. šŸ˜ž Do you know what might be going on?
a
i think the table name is
transaction
rather than transctionS what do you mean the only value it takes? if you do
Copy code
SELECT
    t.id
    t.type
FROM
    transactions as t
all the results have type purhcase order?
that seems unlikely
umm sorry vendor bill šŸ˜„
a
All the transactions have type
vendBill
. šŸ˜ž Although I now suspect this might be a permissions issue. I’m going to dig into that and see if that resolves it!
a
hmm yeah permissions might be the issue then, good luck
a
thank you! šŸ™ appreciate your help šŸ™‚
s
not sure what you mean by 'all' transactions have the same type - if it's not a permissions issue I'd recommend you run a query more like
select distinct(type) from transaction
a
I meant when I run
select distinct(type) from transaction
, I only see transactions of
vendbill
type. But I confirmed this was a permissions issue! Once I added Purchase Order view permissions I can now see
purchord
transactions. šŸ™‚
šŸ‘ 2
šŸ‘šŸ» 1