Using RelatedRecordData how can we get more than 10 relatedreords in queryrecordtype() (the maximum number is 10).

Certified Senior Developer

I have a requirement to pull parent record and its related records. these are 1-many relationships, and 1 related record contains more than 10 rows.

I cannot user a!queryrecordbyidentifier as i dont have identifier passed. this is based on date filters. 

Any suggestion on how to pull more than 10 relatedrecords under the queryrecordtype() function.

I am able to get all relatedrecords without using RelatedRecordData but i am not able to apply additional filters on relatedrecord data.

Ex: I want request 1 data, and all the statuses of request 1 from status table which is in 1-many relationship. I only want active statuses that are more than 10 rows, for that i tried to use RelatedRecordData but limit is 10 though it only returned active ones as needed.

a!queryRecordType(
  recordType:recordtype!parent,
  fields: {},
  filters: {
    a!queryFilter(
      field: createdon,
      operator: "between",
      value: {
        startdate,enddate
      },
      applyWhen: and(
        a!isNotNullOrEmpty(ri!fromDate),
        a!isNotNullOrEmpty(ri!toDate)
      )
    ),
    a!queryFilter(
      field: recordtype!parentrecord.relationship.status.isactive,
      operator: "=",
      value: true()
    )
  },  
  pagingInfo: a!pagingInfo(
    a!defaultValue(ri!startIndex, 1),
    a!defaultValue(ri!batchSize, 5000),
    a!sortInfo(
      'recordType!{1d957c5a-225e-4113-8652-104557ca1279}SRT Request.fields.{23f70599-fefc-46a4-8183-3e0a1dd58c91}id',
      true()
    )
  )
)

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data