QueryDef returns only 10,000 records in Adobe Campaign workflows
When running workflows in Adobe Campaign Classic, if you don’t specify the lineCount attribute, queryDef inside a JavaScript activity returns only 10,000 records. Record counts appear stuck at 10,000 even when more records exist. To resolve the issue, set the lineCount attribute to a higher value in the queryDef configuration.
Description description
Environment
Adobe Campaign Classic, v7.4.2
Issue/Symptoms
- A workflow using the
queryDefinside a JavaScript activity returns exactly 10,000 records. - The record count does not increase beyond 10,000, even when more records exist.
- This behavior occurs when a FOR loop processes results from a
queryDefoperation without specifying thelineCountattribute.
Resolution resolution
Follow these steps to resolve the issue:
-
In Adobe Campaign Classic, go to Campaigns
>Workflows, and open the workflow that contains thequeryDefoperation. -
Locate the JavaScript activity in the workflow that uses the
queryDefAPI to select records. -
Add or update the
lineCountattribute inqueryDefto a higher value. For example:code language-none var query = xtk.queryDef.create( <queryDef schema="nms:recipient" lineCount="80000"> <select> <node expr="@id"/> </select> </queryDef> ); -
Save and execute the workflow.
-
Verify that the returned record count exceeds 10,000 and meets expectations.
-
Adjust
lineCountas needed for performance and optimal results.
Notes:
- If
lineCountis not specified, the query returns up to 10,000 records by default. - Setting
lineCount="0"returns no records; it does not mean unlimited results. - Increasing
lineCountretrieves more records but may reduce system performance if set too high. - Only the first N records (where N equals
lineCount) are returned, even if more match the criteria.