Cannot write to records from interface

Certified Associate Developer

a!localVariables(
  local!emails:{
   "def@gmail.com","abc@gmail.com"},
  local!a,
  a!formLayout(
    label: "Form",
    contents: {},
    buttons: a!buttonLayout(
      primaryButtons: {
        a!buttonWidget(
          label: "Submit",
          submit: true,
          saveInto: {
            a!forEach(items: local!emails,
          expression: 
            a!writeRecords(
            records: 'recordType!{c5b11a4d-cd52-43c4-ab87-2e1ef53bfcee}BMA Emails'(
              'recordType!{c5b11a4d-cd52-43c4-ab87-2e1ef53bfcee}BMA Emails.fields.{20167940-35f1-4106-9a3b-6a585ba2fff2}email': fv!item,

            ),
            onSuccess: {a!save(local!a,append(local!a,1))},
            onError: {}
          ))},
          style: "SOLID",
          loadingIndicator: true
        )
      },
      secondaryButtons: {
        a!buttonWidget(
          label: "Cancel",
          value: true,
          saveInto: {},
          submit: true,
          style: "OUTLINE",
          validate: false
        )
      }
    )
  )
)

Hello I want to send a list of emails to record type using a local variable, but couldn't able to do,

Thanks

  Discussion posts and replies are publicly visible