In Dynamics 365 CE (CRM Online) I have a custom entity, "Subscription" which has two lookups to "Contact" - one lookup representing the "Subscriber" and another lookup representing the "Payer".

As standard with lookup fields are also two "Related Views" (one displaying all Subscriptions where the Contact is the Subscriber and the other displaying alle Subscriptions where the Contact is the Payer).

All of this is standard MsCRM functionality and works well.


My goal now is to consolidate these two views into one common subgrid to be placed on the Contact form (displaying all subscription engagements of the contact regardless if the contact is subscriber or payer)

- but how?

I have successfully built the query in SQL (using a hardcoded GUID of a Contact record) and used that to produce the equivalent FetchXML code.

Both the SQL and the FetchXML gives me the anticipated result (for that one GUID hardcoded):


The problem is that CRM will not allow me to import the view - I have tried uploading it via XrmToolBox (View Designer / FetchXML Builder) as well as I have tried manually adding the FetchXML code to the Customizations.xml and imported the solution zip file - but all my tries have been unsuccessful (CRM rejects the code so nothing is imported).

I have tried to replace the hardcoded GUID in the code with the attribute of the Contact (contactid) as it in the end is going to be a subgrid on the contact form - but it still fails...

I really don't think what I want to achieve is that crazy or should be very difficult to achieve (I mean the code is fairly simple) and both lookups are to the same entity - so what am I doing wrong here?!??

Any help would be much appreciated! :-)