web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Unanswered

Consolidated subgrid based on two lookups

(0) ShareShare
ReportReport
Posted on by 30

Hello,

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".

Two-lookups.png

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).

Standard-Subgrids.png

All of this is standard MsCRM functionality and works well.

HERE COMES THE CHALLENGE:

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):

1581.SQL.png 5037.FetchXML.png

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! :-)

I have the same question (0)
  • AD-28040936-0 Profile Picture
    on at
    Hi Tomas,
     
    Did you figure this out? I have got a very similar problem.
     
    Thanks!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 70 Super User 2025 Season 2

#2
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 43 Most Valuable Professional

#3
Daniyal Khaleel Profile Picture

Daniyal Khaleel 32 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans