Vedachalam Mahadevan
03/11/2025, 2:23 PMCeligo AI
03/11/2025, 2:24 PMAI generated answer (using internal Slack threads):To search for a file in a specific folder and with a specific filename in NetSuite, you can use SuiteScript's search module. Here is a sample code snippet that you can use as a reference:
javascript
var fileSearchObj = search.create({
type: "file",
filters:
[
["folder","anyof",1], // Folder ID
"AND",
["name","is","a.pdf"] // File name
],
columns:
[
search.createColumn({
name: "name",
sort: search.Sort.ASC
}),
"folder",
"documentsize",
"url",
"created",
"modified",
"filetype"
]
});
This script will create a search for files where the folder ID is 1 and the file name is 'a.pdf'. The search results will include the file name, folder, document size, URL, creation date, modification date, and file type.
******
Disclaimer:
This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes.
******Celigo AI
03/11/2025, 2:24 PMSlack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.811079681
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.791568816
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.791137874
Celigo AI
03/11/2025, 2:24 PM