Question
Using match function inside a recordlink
I am trying to open record summary for requests but whatever record I open I'm getting record doesn't exist. I attached my code I can understand something is wrong but couldn't get what I was missing. The ri! Request relation is of type request relation. Anyone can help?
a!sectionLayout(
contents: a!forEach(
items: ri!RequestRelation,
expression: a!cardLayout(
contents: {
a!linkField(
links: a!recordLink(
label: "link",
recordType:
a!match(
value: index(
a!queryRecordByIdentifier(
recordType: 'recordType! Request',
identifier: tointeger(fv!item[requestRelation.field.AppId])
),
'recordType! Request.fields.applicationId',
{}
),
equals: 212,
then: 'recordType!ABC',
equals: 213,
then: 'recordType!ARC',
default: null
),
identifier: a!match(
value: index(
a!queryRecordByIdentifier(
recordType: 'recordType! Request',
identifier: tointeger(fv!item[requestRelation.field.AppId])
),
'recordType! Request.fields.applicationId',
{}
),
equals: 212,
then: 'recordType! Request.relationships.ABC.fields.requestId',
equals: 213,
then: 'recordType! Request.relationships.ARC.fields.requestId',
default: null
)
)
)
}
)
)
)
