I'm trying to manually create a related action for a record type (the auto generator didn't work). I need to create an expression rule that returns an individual record based on the record ID (according to the documentation), but there doesn't seem to be any documentation on how to actually do this. I've posted what I have currently that is not working, could someone let me know what I'm doing wrong?
Thanks in advance!
Expression rule:
a!queryRecordType( recordType: 'recordType!{5e8d63c0-430d-4636-9dfe-e5e4c67aefc5}SH survey data', fields: {}, pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 1 ) ).data[ri!identifier]
Context field in Related Acton configuration:
{ record: rule!SH_getSurveyRecordById(rv!identifier) /* SH survey data */ }
Discussion posts and replies are publicly visible
As far as I know you'd need to use a!queryFilter() within a!queryRecordType() just like you'd use in a!queryEntity. Your filter would identify the PKID field, operator of "=", and value of ri!identifier. If there's any more quick/direct/magic-hand-wavey way of doing this via a!queryRecordType() then i'm unaware of it.
The documentation for a!queryRecordType() goes through filtering pretty in-depth, FWIW.
Can't believe I didn't think of that, but that was it. Thanks, Mike!