In a post yesterday, i left open the question of assigning a Lookup field value in a new record in a child entity when i use the CDS.Createanewrecord Action in Flow.
When i tried the simple experiment to test the obvious answer, i hit one design time issue which produced a referential integrity issue, post hoc.
In the Flow editor, there is no field in the child entity (viz., Search incident) called Modo (which is the name of the Lookup field in CDS). I didn't know if referential integrity rules would allow Flow to create a Seach Incident record without a Modo value, but it did.
So I suspect I left out a step when defining the Entity Relationship between Modo and Seach Incident entities.
Two questions then (btw, should i make a habit of breaking up posts with multiple questions into multiple posts?):
- Can I use Flow to create consistent child entity records? (otherwise, i will revert to my original strategy of using a text field for the parent ModoId)
- Is full referential integrity part of the Entity Relationships value proposition in CDS (and if so, where do the docs show us how to fully implement a Relationships)
In my next experiment I will delete a Modo record that is the parent of a Search Incident record. If there is referential integrity i expect, I won't be able to; but since I have doubts about integrity, I expect CDS will not complain.