SalesforceLabs / ActivityTimelineLWC

A LWC implementation of the Activity Timeline https://lightningdesignsystem.com/components/activity-timeline/#site-main-content
BSD 3-Clause "New" or "Revised" License
25 stars 21 forks source link

Database.query in RecordTimelineDataProvider.getTimelineItemData not fetching all data #24

Open djs959 opened 1 month ago

djs959 commented 1 month ago

Currently RecordTimelineDataProvider.getTimelineItemData assumes all the data is returned in the initial call to Database.query which results in the timeline not displaying all the records without an indication some records are missing.

When Database.query is called if there are more than a few records in the result, the field done is false and nextRecordsUrl should then be called to fetch the remaining rows.

This is described in https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_query.htm

nextRecordsUrl is potentially returned for each object in the result. So the fix will require iterating through objects in the result, calling nextRecordsUrl where needed and reassembling the result to be returned to the LWC.