This topic contains 4 replies, has 0 voices, and was last updated by chanarbon 7 years, 8 months ago.

  • Author
    Posts
  • #1085

    dpetkilev

    Hi,

    I am writing code to integrate Netsuite with other application using RESTlets and SuiteScript 2. I can easily select any record using record.load and providing record type and record id. But I also need to be able to select all records from the lists like Customers, Site Catogories, Inventory Items and Orders.

    Could someone show how to do this using SuiteScript 2?
    This is a cached copy. Click here to see the original post.

  • #1086

    david.smith
  • #1087

    dpetkilev

    ….I mean I need to select all records from Customer list not the list of fields…

    Same way like “record.load” returns one record but I need to select all records.

  • #1088

    markjasonflores

    @depetkilev

    You will have to create a saved search, either through the UI or through dynamic filtering.

    Once it returns the records you want, (like all customers)

    Then, load this search and run. It will return the list of customers.

    After you

  • #1089

    chanarbon

    I agree with Jason. Best approach is performing a search against the record type. But on thing to note, is the usage units that you have. A better approach is to use a paginated search using Search.runPaged() instead of the usual search and on the restlet request, add the page parameter to enable the improved performance of the process.

You must be logged in to reply to this topic.