Search record action - allow to search more than 1 record (#14769)

https://github.com/user-attachments/assets/426da6af-6c6b-4d49-9034-0aa041cb331f
This commit is contained in:
Thomas Trompette
2025-09-30 12:07:25 +02:00
committed by GitHub
parent 4b87908752
commit b7cdf9183a
9 changed files with 177 additions and 47 deletions
@@ -107,7 +107,7 @@ export class FindRecordsWorkflowAction implements WorkflowAction {
return {
result: {
first: objectRecords[0],
last: objectRecords[objectRecords.length - 1],
all: objectRecords,
totalCount,
},
};
@@ -144,7 +144,11 @@ export class FindRecordsWorkflowAction implements WorkflowAction {
);
return withOrderByQueryBuilder
.take(workflowActionInput.limit ?? QUERY_MAX_RECORDS)
.take(
workflowActionInput.limit
? Math.min(workflowActionInput.limit, QUERY_MAX_RECORDS)
: QUERY_MAX_RECORDS,
)
.getMany();
}