Hi, Guys. I want to get full data from query.runSu...
# suitescript
x
Hi, Guys. I want to get full data from query.runSuiteQL. Now, it returns only 5000 records. Do you know how to get all data from it? such as pagination and etc
t
@XueDong Mei To get beyond the 5000 record limit, you can paginate using a non-correlated subquery, and the ROW_NUMBER function. Here's a simple example:
Copy code
SELECT
	*
FROM
	(
		SELECT
			ROW_NUMBER() 
				OVER ( 
					ORDER BY
						Transaction.ID
				) LineNumber,
			Transaction.ID,	
			Transaction.TranDate,
			Transaction.Type,
			Transaction.TranID
		FROM
			Transaction
		WHERE
			 ( Transaction.Voided = 'F' )
		ORDER BY
			Transaction.ID
	)
WHERE
	LineNumber BETWEEN 5000 and 10000
x
Okay. I got it. Thanks @tdietrich
t
You're welcome! Good luck.
👍 1