ajrey77
02/24/2026, 11:49 PMCeligo AI
02/24/2026, 11:49 PMAI generated answer (using internal Slack threads):To assign a resource to a project using SuiteScript 2.1, you would need to load the project record, then access the 'resourceallocation' sublist and add a new line to it. Here's a simplified example of how you might do this:
javascript
var projectRecord = record.load({
type: record.Type.PROJECT_TASK,
id: 'your_project_id'
});
var resourceSublistId = 'resourceallocation';
projectRecord.selectNewLine({
sublistId: resourceSublistId
});
projectRecord.setCurrentSublistValue({
sublistId: resourceSublistId,
fieldId: 'resource',
value: 'your_resource_id'
});
projectRecord.commitLine({
sublistId: resourceSublistId
});
projectRecord.save();
In this example, replace 'your_project_id' with the internal ID of the project you want to assign the resource to, and 'your_resource_id' with the internal ID of the resource you want to assign.
Please note that this is a simplified example and you may need to set additional fields on the resource allocation sublist line depending on your specific requirements.
******
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:49 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.823730588
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.818420529
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815918
Celigo AI
02/24/2026, 11:49 PMajrey77
04/13/2026, 4:16 PM