Heyhey, I'm trying to migrate some scripts to use ...
# suitescript
s
Heyhey, I'm trying to migrate some scripts to use the sql module for lookups, but I'm struggling to understand how some of this data is structured. Here's the first naive attempt to list customer deposits related to a sales order, but that salesorder field wasn't where I expected to find it:
Copy code
query.runSuiteQL({
    query: 'SELECT id, paymentmethod FROM transaction WHERE type = ? AND salesorder = ?',
    params: ['CustDep', salesOrderId],
})
b
i personally like making the dataset in the ui, then using SuiteQL.query to see what the query looks like
s
thank you! I'll attempt the same then 😁