Luis
02/05/2025, 8:06 PMlet itemJoin = transactionLineJoin.autoJoin({
fieldId: 'item'
});
and then I'm trying to access purchase unit
itemJoin.createColumn({ fieldId: 'purchaseUnit' })
But I'm getting:
Error getting Sales Orders: {"type":"error.SuiteScriptError","name":"SSS_SEARCH_ERROR_OCCURRED","message":"Search error occurred: Record Join 'item' for record 'transactionLine' was not found."Celigo AI
02/05/2025, 8:06 PMAI generated answer (using internal Slack threads):Based on the conversations, it seems like the error you're encountering is due to the incorrect usage of the join in your query. In NetSuite, the first join when creating a query cannot be an autojoin, it needs to be explicit. Here's an example of how you can do it:
javascript
var memberJoin = kitQuery.joinTo({
fieldId: 'member',
target: 'memberitem'
})
Also, when you're trying to get the value from a joined field in the result set, you need to include the join in the getValue()
method. For example:
javascript
result.getValue({name: 'entityid', join: 'vendor'})
If you're still having trouble, you might want to consider creating the search in the UI and then using a tool like the NetSuite Search Export Chrome extension to generate the SuiteScript code for the search. This can help you identify any issues with your join or field names.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
02/05/2025, 8:07 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.861477435
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.85582149
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.853719
Celigo AI
02/05/2025, 8:07 PM