Skip to main content
Known Participant
Dec 10, 2024 6:08 PM UTC
Question

Can't write multiple records with same relational ID

The input "Records" cannot insert or update a record which is referring to different referenced records via propostaId at the same time. To create a reference to a related record, include either a relationship reference or the required common field value for "propostaId". Location of conflicting changes: GC Document [1]
= a!forEach(
  pv!documentos,
  a!update(
    fv!item,
    'recordType!{GC Documento .fields.{389973d7-a3f2-4ce3-aafb-9c2021e72ce9}propostaId',
    pv!idProposta
  )
)
I can't find anything about this error at all

3 replies

stefanhelzle0001
Brainy
Dec 10, 2024 7:45 PM UTC

Can you share the state of that process variable before you try to write it to the record?

mathieud0001
Genius
Dec 11, 2024 2:43 AM UTC

This thread might be helpful: https://community.appian.com/discussions/f/data/30937/the-input-records-must-refer-to-record-types-with-data-sync-enabled-that-use-a-database-as-the-source-received-the-record-type-name-which-is-related-to-the-the-record-given-in-input?pifragment-13604=2

It could be related to the version of Appian you're running and if you related record data type is from a different source.

Alternatively, did you try using a constructor instead of an update statement?

i.e.

gemlorenza0001
New Participant
Feb 19, 2025 1:38 PM UTC

I encountered the same issue and tried to use record relation instead of the common field, which resolved the problem for me.

Can you share the state of that process variable before you try to write it to the record?

- pv!comment is saved using "Write Record" node then update the "pv!comment" using the same node