Shelby Owens
05/22/2025, 2:28 PMCeligo AI
05/22/2025, 2:29 PMAI generated answer (using internal Slack threads):To create a sales order and have it linked to a Case where it shows up under the Related Records>Transactions of the Case using SuiteScript, you can use the
N/record
module's attach
method. This method allows you to attach one record to another.
Here is a basic example of how you can use the attach
method:
javascript
var record = require('N/record');
function attachRecord() {
var attachResult = record.attach({
record: {
type: 'salesorder',
id: '123' // replace with your Sales Order internal id
},
to: {
type: 'supportcase',
id: '456' // replace with your Case internal id
}
});
}
In this example, a Sales Order with internal id '123' is attached to a Support Case with internal id '456'.
Please note that you need to replace '123' and '456' with your actual Sales Order and Case internal ids.
Also, keep in mind that this operation might be somewhat complex since you have to pass both the sales order internal id and the case internal id to the workflow action script.
******
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
05/22/2025, 2:29 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.876536548
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.867258251
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.836870611
Celigo AI
05/22/2025, 2:29 PM