When you've added a N:1 relationship from a normal entity to a virtual entity, and you add that field to the entity form
What I did.
- Create new virtual entity
- Add 1:N relationship from virtual entity to normal entity (account in my case)
- Add the relationship field on the account form
- Add a quick view control for the virtual entity on the account form
- Add a reference to external virtual entity data on existing account
- Delete data from external data source
- Open account form
- An error message is shown, and you cannot open the account form
The error message you get is the following
If you open the log file it states the following error type:
Yes, I'm experiencing the same thing, how can you help me?
It's an easy fix, albeit stupid one. To fix this you need to remove the quick view form (not the lookup field) from the account form, and publish the changes. Alternatively you can open the account in another form where the quick view for the virtual entity isn't present. What you'll see when you open this form is that instead of deleting the value, Dynamics will replace it with a "(No name)" reference
The reason for this is that the clever guys at Microsoft decided that they shouldn't automatically remove/delete the reference, because that would delete your references when the external system is unavailable. However, they don't have a proper check in place for quick view controls on the entity form.
I tried to put the quick view in a hidden control, hidden tab, and even collapsed section, but nothing will prevent this error from triggering. So the there is no work-around as of now.
Just gotta wait for the next iteration I guess :)