I have an architecture of parent and child records such that Top(T) has one or more children records (M), each of which can have one or more children records (L).
I run a saved search paged. The search record type is M so I can find all L records associated with M's parent T.
I've created a set of test records such that a page size of 5 will ensure some L records end up on separate pages (most T records have three L records associated).
One test case works correctly, adding L records from a page not within the page range. However, on a particular page, an L record is duplicated and a third L record is lost. When I run the search such that the results are returned on a single page (by using a pagesize of 1000 say), all three records for that T record are found and there are no duplicates. Details below if you're interested.
Has anyone run into this before?
DETAILS
Search setup: Search on M, sort by T's NetSuite id. There is a 1:1 relationship between search results and L records.
Records:
<T record> : <Associated M record count> : <Total associated L record count>
T0 : 1 : 2
T1 : 1 : 2
T2 : 1 : 3
T3 : 1 : 3
T4 : 1 : 3....etc. to T7
With a pagesize of 5, I expect a search on page 0 to return 3 objects (T0, T1, and T2), where T2 pulls data from page 1 to complete its data object. This runs as expected.
Page index
| Result count for single T | Result count for single T
| Result count for single T
|
|---|
| 0 | 2 (T0) | 2 (T1) | 1 (T2:M1:L1) |
| 1 | 2 (T2:M1:L1-L2) | 3 (T3) | |
| 2 | 3 (T4) | 2 (T5:M1:L1-L2 expected) | |
| 3 | 1 (T5:M1:L3 expected) | 3 (T6) | 1 |
| 4 | 2 | 3 | |
| 5 | 3 | 2 | |
On a search on page range 1-2, I expect 3 objects (T3, T4, T5) each with three L records associated. The search results page 2 has T5.M1.L2, T5.M1.L3. When I grab page 3 to see if it contains an L record for T5, its first result is T5.M1.L3, which was the last result of page 2. T5.M1.L1 is not found when paged in this way. When I run the search so all the results are returned in a single page, T5.M1.L1 is found and T5.M1.L3 is not duplicated.