Parent child data export by using cliient side object model sharepoint

suyog mahindrakar 21 Reputation points
2020-08-13T08:41:23.787+00:00

I have 2 lists(Parent-child) Order and order details, I want to generate a report by using javascript or rest API

how can I do that easily. Do I initially read parent-child items and then 1 by 1 I need to fire the query fo child list and get the data and then generate the report.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,371 questions
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,619 questions
{count} votes

2 answers

Sort by: Most helpful
  1. sadomovalex 3,631 Reputation points
    2020-08-17T14:58:22.67+00:00

    hi, it depends on how many data is stored in both lists. If lists are not very big and not expected to be very big - you may load all items from both lists using 2 JSOM requests (see How to: Retrieve List Items Using JavaScript) and then built your report in javascript.

    If amount of items is big (e.g. more than 5000 items which may cause throtling problems) you have few options:

    0 comments No comments

  2. Amos Wu-MSFT 4,051 Reputation points
    2020-08-24T08:32:36.347+00:00

    JSOM and REST API have their own attributes.
    The following are the advantages of going with REST:

    1. REST web requests are easier to work with that we can use Browser to test them.
    2. No overheads of WSDL creation Or Detailed SharePoint knowledge required.
    3. No overheads of tying up with Service Reference.
    4. Direct calls for fetch, insert, update, delete, and find operations.
    5. Better Interoperability supporting different clients on different platforms, programming models.

    JSOM Advantages:

    1. JSOM supports Batching

    More reference:
    https://www.sharepointeurope.com/a-comparison-of-jsom-and-rest/#:~:text=JSOM%20is%20more%20technology%20dependent,without%20worrying%20about%20request%20handling.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.