Hi , while running pagedData on saved search - whe...
# suitescript
a
Hi , while running pagedData on saved search - when I am passing pageSize as 2 but in return I am getting 5 page as a output
b
a
yes , I using the same method
but it looks like when I am providing the page size then it is giving me page size as 5
Copy code
{
   count: 6,
   pageRanges: [
      {
         index: 0,
         compoundLabel: "Test_file_2 — Test_file_6"
      },
      {
         index: 1,
         compoundLabel: "Test_file_7.Xml"
      }
   ],
   pageSize: 5,
   searchDefinition: {
      type: "file",
      id: 3019,
      filters: [
         {
            name: "folder",
            operator: "anyof",
            values: [
               "295830"
            ],
            isor: false,
            isnot: false,
            leftparens: 0,
            rightparens: 0
         }
      ],
      columns: [
         {
            name: "internalid",
            label: "Internal ID",
            type: "select",
            sortdir: "NONE"
         }
      ],
      "settings": [],
      title: null,
      scriptId: "customsearch_vb_xmls",
      isPublic: true
   }
}
pageSize as 5
Copy code
var searchObj = search.load({
                id: "customsearch_vb_xmls",
                type: "file"
            })
            
            var pageData = searchObj.runPaged({ //
                pageSize : 2
            });
            log.error("pageData >> fetchSearchResult : ",pageData);
            var pageRange = pageData.pageRanges;
            var page = pageData.fetch({ index: pageIndex });
b
Read the entire page
a
thanks
The minimum number allowed is 5.
make sense then