I'm trying to create a folder within the folder. B...
# suitescript
t
I'm trying to create a folder within the folder. But I can't seem to identify how to save my new folder to my specified directory. All I have is something like this
function createFolderPerCustomer(_customerName_) {
const objRecord = _record_.create({
type: _record_.Type.FOLDER,
isDynamic: true
});
objRecord.setValue({
fieldId: 'name',
value: _customerName_
});
const folderId = objRecord.save({
enableSourcing: true,
ignoreMandatoryFields: true
});
return folderId;
}
b
usual approach is to create the folder you want in the ui
then load it in script to see what fields you need to set
t
oh i see not on the back end.. thanks @battk. I also found that there is a 'parent' attrib