How to prepare record type in variable?

Hello Everyone,

I am working with record type.

There is a requirement to prepare record type using rule input.

This is the logic I am using:

a!forEach(
  items: ri!reminderInfo,
  expression:fv!item['recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{5515212e-0535-40f5-aa3e-1d92c83c23ca}appointmentId': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{274539be-ac91-4f4c-95ed-69bd50175dae}appointmentId',null),
  'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{e7f92751-d0c8-4ce6-a252-2bd4b3bee143}createdBy': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{9cc0bbe6-dc99-4b3c-bf8b-e70e36fbbbb0}createdBy',null),
  'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{82394d77-2331-4196-9d8e-3aaaf57888a3}createdOn': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{19a1f573-e088-4dd7-bc12-285695cf99c0}createdOn',null),
  'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{9239e959-1781-4c7f-9b71-83d00def8913}isActive': true()]
)

a!forEach(
items: ri!reminderInfo,
expression:fv!item['recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{5515212e-0535-40f5-aa3e-1d92c83c23ca}appointmentId': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{274539be-ac91-4f4c-95ed-69bd50175dae}appointmentId',null),
'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{e7f92751-d0c8-4ce6-a252-2bd4b3bee143}createdBy': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{9cc0bbe6-dc99-4b3c-bf8b-e70e36fbbbb0}createdBy',null),
'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{82394d77-2331-4196-9d8e-3aaaf57888a3}createdOn': index(ri!appointmentInfo,'recordType!{5746f330-8c31-4ea7-9807-cbbd2fd557eb}AMS_DG Appointment.fields.{19a1f573-e088-4dd7-bc12-285695cf99c0}createdOn',null),
'recordType!{e5a6a458-a1b1-4679-91c9-944cecdfdac6}AMS_DG Appointment Reminder.fields.{9239e959-1781-4c7f-9b71-83d00def8913}isActive': true()]
)

This is the error pops up: Expression evaluation error in rule 'ams_dg_preparereminderrecord' at function a!forEach: Error in a!forEach() expression during iteration 1: Expression evaluation error: AMS_DG Appointment Reminder must be indexed by its corresponding record type fields or relationships) (Data Outputs).

Please help me with this

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data