Michael Hosier
04/14/2021, 1:51 AMSam L
04/14/2021, 11:40 AMMichael Hosier
04/14/2021, 11:25 PMSELECT transaction.id FROM transaction WHERE shipmethod = 520
Using the Schema Browser online I cannot wrap my head around how to map things out to get the select statement to pull in the shipmethod.
Any body have experience with this or a good resource about how to read the Scheme Browser to make these connections?stalbert
04/15/2021, 2:31 PMIN
clause. e.g.
sql
select id from transaction where type in ('CashSale', 'CustPymnt')
when I have only CashSale in there, it returns many rows. When I add 'CustPymnt' it returns only one row. I thought an IN clause worked like an OR, so I should only see more results not less when adding arguments to the IN clause?Taylor
04/15/2021, 8:59 PMinternalid
of native NetSuite records to the table name for that record? E.g. say I have a custbody field that is List/Record of type Customer. If you were to run select fieldvaluetyperecord from customfield where upper(scriptid) = upper('custbody_my_cust_field')
the fieldvaluetyperecord
returned would be -2
which corresponds to Customer. How do you turn that into the fact that the list of options for this custom field would come from the customer
table/view?
For custom lists and custom records you can run select scriptid from customlist where internalid = [the fieldvaluetyperecord from prior query]
and then the scriptid
there would be the “table/view” to query for options for the List/Record field. Same thing for a custom record except you query against the customrecordtype
table/view. I have search a good bit and see no way to do this for the native record types though (which should all have negative internalid
).
I found a SuiteAnswer on running a little client side suitescript hack to build out the list of all the internalid/name pairs. But this hack still just gives the record “Name” not the table/view name to query against.
The point is to be able to start with just a field ID — e.g. custbody_my_cust_field
— and from there via SuiteQL/integration sync out of the account all the valid IDs that could be sent as a value for that custom field. The above can accomplish this when the custom field points at a custom list or custom record. But when it points at a native NetSuite record, I seem to be SOL.
If anyone has dabbled in this and has some insight that would be much appreciated.Simon Irjala
04/16/2021, 12:30 PMfunction runPaged(q, params) {
const results = query.runSuiteQLPaged({ query: q, params: params, pageSize: 1000 });
let output = [];
for (let page of results.pageRanges) {
output.push(...results.fetch({ index: page.index }).data.asMappedResults());
}
return output;
}
Jack R
04/19/2021, 6:11 PMBudy Sutjijati
04/22/2021, 12:46 PMquery.runSuiteQL
? I can’t find it at the Help Center docs but using query.runSuiteQL.promise
in client side and server side scripts worksEystein Bye
04/26/2021, 7:37 AMORDER BY
to my queries, I get no result.
SELECT LastName FROM Employee ORDER BY LastName
will give:
{
"links": [
{
"rel": "self",
"href": "....rest/query/v1/suiteql?limit=1000"
}
],
"count": 0,
"hasMore": false,
"items": [],
"offset": 0,
"totalResults": 124
}
If I remove the ORDER BY
I will get the 124 results. What am I doing wrong?Zoran Roncevic
04/26/2021, 7:38 AMEystein Bye
04/26/2021, 7:39 AMFahim Bari
04/30/2021, 6:46 AMPlanetJupiter
04/30/2021, 10:37 AMFahim Bari
05/03/2021, 7:24 PMSearch error occurred: Field 'custcol_ihm_order_price' for record 'transaction' was not found.
custcol_ihm_order_price is custom coumn field in the transaction record.
var weeklyScheduleQuery = query.create({
type: "customrecord_ihm_weekly_schedule"
});
var transactionJoin = weeklyScheduleQuery.joinTo({
fieldId: "custrecord_ihm_ws_sales_order",
target: query.Type.TRANSACTION
});
weeklyScheduleQuery.columns = [
transactionJoin.createColumn({
fieldId: "custcol_ihm_order_price"
}),
];Sandii
05/03/2021, 7:34 PMtransactionlines.custcoletc
Azi
05/03/2021, 11:13 PMAzi
05/03/2021, 11:15 PMstalbert
05/03/2021, 11:19 PMstalbert
05/03/2021, 11:20 PMMark Christensen
05/04/2021, 7:21 PMSandii
05/04/2021, 7:49 PMsmoke raven
05/07/2021, 7:20 PMbillingaddress
. . . using the schema/record/connect/analytics browser pages i can't quite correlate how/where it relates . . . in MS SQL there would be a FK and you could see it pointing to address or billingaddress table . . . in this case those tables do not exist (there are customeraddressbook etc) . . . if i use the BUILTIN-DF i can get related data but i can't figure out where it's cominng from and how the docs would tell me that
so, how do i figure out where billingaddress "points"? thanks muchAlan Fitch
05/09/2021, 4:25 AMTransactionLine
? Specifically an Inventory adjustment record?Alan Fitch
05/09/2021, 5:15 AMInventoryAdjustments
and right joining TransactionLine
.
Do I have access to ISNUMERIC?NSDev
05/10/2021, 9:22 PMexport const getItemsByCategory = ({ categoryIds }) => {
return query.runSuiteQL({
query: `SELECT item.id, itemid as name
FROM item
WHERE custitem_category in (?)`,
params: categoryIds
}).asMappedResults()
}
categoryIds is an array of ids. When I pass in one id, it works, but when I pass in 2 ids:
getItemsByCategory({categoryIds:[224,155]})
I get this error:
message: 'Invalid number of parameters. Expected: 1. Provided: 2.',
object: {
type: 'error.SuiteScriptError',
name: 'INVALID_NUMBER_OF_PARAMETERS',
message: 'Invalid number of parameters. Expected: 1. Provided: 2.',
Can anyone help?Budy Sutjijati
05/17/2021, 11:50 AM[
{
"owner": 1648,
"isinactive": "F",
"custrecord_rfi_trm_fulfilment_number": "RELATIONSHIP FIELD",
"lastmodified": "17/05/2021",
"created": "17/05/2021",
"name": "973",
"externalid": null,
"id": 973,
"custrecord_rfi_trm_ship_nr_det": 836,
"custrecord_rfi_trm_salesorder": "RELATIONSHIP FIELD"
}
]
ExtendApps Inc.
05/18/2021, 12:42 PMAva
05/19/2021, 1:45 PMjen
05/19/2021, 5:22 PMjen
05/19/2021, 5:22 PM