In the script, we can create a subfolder in the file cabinet.
let val = -15; //Internal ID of the parent folder
let objRecord = record.create({
type: record.Type.FOLDER,
isDynamic: true
});
objRecord.setValue({
fieldId: ‘parent’,
value: val
});
objRecord.setValue({
fieldId: ‘name’,
value: folderName
 });
                                       
let recordId = objRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true
});