ajrey77
02/24/2026, 11:37 PMCeligo AI
02/24/2026, 11:37 PMAI generated answer (using internal Slack threads):To assign a generic resource to a project using SuiteScript 2.1, you can use the
record.attach method. This method is used to attach one record to another. In your case, you would be attaching a resource record to a project record.
Here is a basic example of how you might use the record.attach method:
javascript
var resourceRecordId = '123'; // replace with your resource record id
var projectRecordId = '456'; // replace with your project record id
var attachOperation = record.attach({
record: {
type: 'genericresource',
id: resourceRecordId
},
to: {
type: 'job',
id: projectRecordId
}
});
In this example, genericresource is the record type for the generic resource and job is the record type for the project. You would replace '123' and '456' with the actual IDs of your resource and project records, respectively.
******
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/24/2026, 11:37 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813781738
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.808837771
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.80682373
Celigo AI
02/24/2026, 11:37 PM