https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
t

Tyn Guardian

04/05/2022, 2:23 AM
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

battk

04/05/2022, 3:13 AM
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

Tyn Guardian

04/05/2022, 3:35 AM
oh i see not on the back end.. thanks @battk. I also found that there is a 'parent' attrib