Skip to main content
November 4, 2025
Question

Why this error when calling queryRecordType in an Expression Rule?

  • November 4, 2025
  • 3 replies
  • 0 views

Hi,

I have a RecordType "Project" (no Sync) used in a whole application that works fine (the source is a MySQL View which works fine).
But when I tried to call this from an Expression Rule (please see the code below) I obtain this error :

"Expression evaluation error at function a!queryRecordType: A null parameter has been passed."

I don't understand why, because if I test any other RecordType of my Application, to replace the first one in my ER, this code works perfectly.


Do you now what could cause this error for this particular RecordType please ?  (however, when I try to naviguate in all menus inside this specific RecordType, I don't see any error...)

a!queryRecordType(
Â%A0 Â%A0recordType: recordType!Project,
Â%A0 Â%A0fields: {},
Â%A0 Â%A0pagingInfo: a!pagingInfo(
Â%A0 Â%A0 Â%A0 startIndex: 1,
Â%A0 Â%A0 Â%A0 batchSize: 1
Â%A0 Â%A0)
)

3 replies

harshas2775
November 4, 2025

Try saving the record type again then query it. By the description it doesnt look like any configuration issue, so try in other ways. You can also try to use the Query Editor to generate the code and see if it works.

 

November 4, 2025

Thanks a lot Harsha for your idea.
by using the editor, the batchsize was set to 100, and the generated code worked fine.

Testing with batchsize = 2, it was working too, but I could see a View incoherence : the identifier of the first record is null.
so that explains now why this error occured when batchsize = 1

Regards

harshas2775
November 4, 2025
the identifier of the first record is null.
so that explains now why this error occured when batchsize = 1

Makes sense!