Nour Khaled
04/29/2025, 11:39 AMCeligo AI
04/29/2025, 11:39 AMAI generated answer (using internal Slack threads):Based on the conversations, it seems like the issue is related to how the
getValue
function is being used in SuiteScript. When you are trying to get the value of a field from a joined search, you need to pass the join
parameter in the options object.
For example, in the first conversation, the issue was that the getValue
function was trying to get the value of 'itemid' directly, but 'itemid' was a field in a joined search. The correct way to get the value would be:
javascript
var assembly = result.getValue({
name: 'itemid',
join: 'workOrder'
});
In the second conversation, the issue was that the search was created but not run. The correct way to get the value would be:
javascript
var assigneeID = search.create({
type: "employee",
filters: [["entityid","is",assigneeName]],
columns: [search.createColumn({name: "internalid", label: "Internal ID"})]
});
var assigneeInternalId;
assigneeID.run().each(function (result) {
assigneeInternalId = result.id
return false;
});
In the third conversation, the issue was similar to the first one. The correct way to get the value would be:
javascript
var customerId = result.getValue({
name: 'internalid',
join: 'customerMain'
});
******
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
04/29/2025, 11:39 AMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.853459716
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.84974587
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.849352956
Celigo AI
04/29/2025, 11:39 AM