Search result code for accessing folders from file cabinet

The search results code for accessing the internal id and name of the sub folders inside a folder in file cabinet

the sub folders is obtained using the internal id of its parent folder, here internal id of parent folder is 386206

filters = [
					new nlobjSearchFilter('parent', null, 'is', 386206),
				];

				columns = [
					new nlobjSearchColumn('internalid'), new nlobjSearchColumn('name')
				];

				searchResults = nlapiSearchRecord('folder', null, filters, columns);
				console.log("search result for folders", searchResults);

The search result for accessing the files inside a folder using the internal id of the folder, which include the internal id, name, URL and file type

filters = [
						new nlobjSearchFilter('internalid', null, 'is', 386313),
					];

					columns = [
						new nlobjSearchColumn('internalid'),
						new nlobjSearchColumn('name', 'file'),
						new nlobjSearchColumn('url', 'file'), 
						new nlobjSearchColumn('filetype', 'file')
					];

					searchResults = nlapiSearchRecord('folder', null, filters, columns);
					console.log("searchresult", searchResults);

Leave a comment

Your email address will not be published. Required fields are marked *