Error saving CDM form after editing field (relationship field), when using CRUD::SAVE

Version: 2025.06-ext2

The issue shows up when saving a CDM form for the second time (CRUD::SAVE).
Looks like the client, after first save, doesn’t update info about the relationship (link) and when it tries to save for the second time, it uses stale link reference to try to remove previous link. It fails, but then also tries to add the new link, which causes “Duplicated link constraint violated” error.

This can be easily reproduced using the Preview App (advanced):

  • change PersonEmployeeWithTeamsAndContracts_CFM model to use CRUD::SAVE (save button)
  • run the app and go to Persons with Team Assignment and Contracts overview
  • select a person and edit Place of Residence
  • save the form
  • once again edit Place of Residence (or any other field)
  • save the form

You should get the error:

Regards,
Grzegorz Witek

Hello @g.witek ,

due to the different data handling mechanisms of CDMs, this “regular form”-action is not supported in the CDM case.

So this action is not supported in the CDM case.
We will adopt the modeling documentation accordingly.

If you need this feature for your business case, please file an A12 Requirement.
A workaround could be to create a custom event that submits the data and reopens the same activity.

Hi,

Thank you for the reply.
I assumed it’s a bug, because we used this functionality with CDMs in pre 2025.06 versions.
I will try to create a custom event.

Regards,
Grzegorz Witek