This topic contains 1 reply, has 0 voices, and was last updated by CREECE 8 years, 9 months ago.

  • Author
    Posts
  • #6771

    CREECE

    I am having a problem getting the subdirectories of SuiteScripts and SuiteBundles folders. I know I can do a search for specific folders using FolderBasicSearch and get the internalID but I want to search for all folders that have either of these as a parent directory. Is this possible using Suitetalk? I don’t see a way to add multiple criteria to accomplish this. Does anyone have a code snippet they could share?
    This is a cached copy. Click here to see the original post.

  • #6772

    CREECE

    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.

You must be logged in to reply to this topic.