I was making this WAY harder than it needed to be. Sorry for anyone that looked at this and went WHAT?
Here is a snippet that will get all of the folders under “SuiteScripts”
The basic idea is to create a RecordRef that will point to the parent Folder and then use that as our search criteria.
1. Create a RecordRef and set its internal ID to -15. -15 is the SuiteScripts folder internal ID
2. Create a SearchMultiSelectField and add the parent directory RecordRef that we created in step 1. The RecordRef must be in a RecordRef array as per method doc. Will use the “anyof” operator was you would in any other normal NetSuite search for ID.
3. Create a FolderBasicSearch and set the parent to be the SearchMultiSelectField that we created in step 2.
4. Run your search with the FolderBasicSearch created in step 3.