Aaron McCausland
12/17/2024, 4:27 PMCeligo AI
12/17/2024, 4:27 PMAI generated answer (using internal Slack threads):To set some of the fields on a sublist of Tasks in an Opportunity custom form as mandatory, you can use SuiteScript. Specifically, you can use a beforeLoad script and use the form from the scriptContext to get the sublist and from there the field you wish to modify. The field has a isMandatory setter that you can use for mandatoriness. Here is a general example of how you can do this:
javascript
function beforeLoad(scriptContext) {
if (scriptContext.type !== scriptContext.UserEventType.CREATE)
return;
var form = scriptContext.form;
var sublist = form.getSublist({id: 'your_sublist_id'});
var field = sublist.getField({id: 'your_field_id'});
field.isMandatory = true;
}
Please replace 'your_sublist_id' and 'your_field_id' with your actual sublist and field IDs.
Remember, this will make the field mandatory for all lines in the sublist. There is no way in NetSuite to set columns mandatory by line.
******
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
12/17/2024, 4:27 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.863735378
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.858050585
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.846647799
Celigo AI
12/17/2024, 4:27 PM