Below is a sample code that gets the folder name of a specific file in your file cabinet.
function getFolderName(){
var file = nlapiLoadFile(8401); //8401 is the internal id of one of your files in your file cabinetvar folderid = file.getFolder();
var folderObj = nlapiLoadRecord('folder', folderid);
var foldername = folderObj.getFieldValue('name');
nlapiLogExecution('DEBUG','Folder Name',foldername);
}
No comments:
Post a Comment