Hey there,
when I try to open an entity of Messgeraet_DM (a child of Antragsdaten_DM) that was created in AntragMessgeraet_CFM, I get the following error in the Preview App:
Cannot read properties of undefined (reading 'loadingState')
The CFM I’m using to display the entity is based on AntragsverwaltungMessgeraet_CDM.
I think what I need is for A12 to take the selected entity from my static instance-MatchCondition and load it into a new document based on a new Antragsverwaltung_DM instance. Would this approach resolve the issue? If so, how can I model/configure this in A12?
Beneath are some workspace Screenshots for illustration.
Thank you for your help and best regards,
Julius
Hi @julius-low-kernel
Sorry for the slow reply. I’ve tried modeling your use-case myself but I keep getting stuck because I’m missing some key bit of information. But let’s get to your questions before I ask my questions
Maybe, if you look at the CDM documentation you can see that the normal Application Modeling strategy for CDMs is to use a match condition based on the respective root Document Model. In your case this would mean:
"key":"model"
"mustEqual":"Antragsverwaltung_DM"
You would then need to create the link between the new instance of Antragsverwaltung_DM and the existing entity of Messgeraet_DM. This could be done using a delegate in Workflows.
However, this is based on a workflow where you:
- Create a new instance of
Antragsverwaltung_DM
- Create a relationship link to the exisiting instance of of
Messgeraet_DM
- Open this in a CFM
Alternate Option
As the relationship Antragverwalten_Messgeraet_RE is a 1-to-1 relationship, would you be open to creating a CDM with Messgeraet_DM as the Root DM?
I assume that AntragsverwaltungMessgeraet_CDM has Antragsverwaltung_DM as the root DM. As a result, you need to link the existing document to it. If the existing document is the root of the CDM, then you can create the link and new document in a single step inside the CDM. You need to be aware of the warnings in the documentation relating to To-1 Bindings but if you are careful, you could have a workflow like this:
- Open the existing instance of of
Messgeraet_DM in a CFM
- Click “Add” on the Binding
- Add the Values to the
Antragsverwaltung_DM Fields
This is the cleanest modeling solution. What do you think?
So now my questions:
- What is the Root DM of
AntragsverwaltungMessgeraet_CDM?
- How is the CFM based on
AntragsverwaltungMessgeraet_CDM opened and the new instance of Antragsverwaltung_DM created? (You screenshot suggests that you are displaying a tree model.)
- What is the end goal? (Perhaps the best solution is something that I haven’t considered so far.)
Hey Malcolm,
sorry for the late response.
I’ve remodeled my CDM, so that Messgeraet is my root, instead of Antragsverwaltung, as you said, and it worked right away.
Thank you as always for your dedicated answer and the right solution!
Best regards,
Julius