Delete behaviour for new objects

3
I have the following situation: I have a new button that triggers a microflow. In this microflow I create Object X and Object Y, Set the reference between the two and show a form. The change action has no commit. In the form I have a custom Cancel button. This triggers an other microflow. In this microflow I have a rollback for Object X. In the meta model I have set the delete behaviour for the reference between Object X and Y. On delete of Object X than also delete Object Y. On delete of Object Y, only Object Y. With this situation I would expect that the delete behaviour would be triggerd, because Object X will be deleted because it is a new object. However, Object Y still exists after triggering the Cancel button of this form. Can anyone explain to my why this happends and if this is correct behaviour?
asked
2 answers
0

As you explain in your own description, you trigger a rollback event, therefore only the before and after rollback event will be triggered.

You have never removed anything so the delete events may not be triggered. And because deletebehaviour is sort of a delete event this will probably not be triggered.

If this is correct behaviour I don't know, but I don't think that it is the desired behaviour. But you should probably create a feature request in MXDN

answered
4

If Object X is new (which it should be according to your explanation), the rollback should delete Object X and subsequently trigger the deletebehaviour routine which should delete Object Y as well.

The only reasons I can think of which would prevent this behaviour are:

  1. Object Y could not be retrieved from the server cache or database (perhaps due to security settings)
  2. Object Y could not be deleted because the user has no permission to deleted this object (this should result in a blocking popup message in the browser however)

If those cases do not apply for your situation I would suggest to create a small project which reproduces this behaviour and file this as an incident in MXDN. This will allow us to investigate this problem in greater detail.

answered