Reputation: 1428
For accounts in Dynamics CRM I have a custom related entity X (one account can have zero or more Xs related to it). On the form of X I want to show a subgrid with all active instances of the same type related to the same account.
Is there a supported way to do this, or do I have to edit the FetchXml on the fly using JS or in the customizations.xml file up front? I have done FetchXml editing in system views to introduce filtering on three or more levels, but I have not done a "loop" before and the same technique fails because the relationship both inwards and outwards in the query is the same.
Upvotes: 0
Views: 2530
Reputation: 1467
In CRM 2013 you can use some nice new functionality - Quick View Forms.
Create a new form for Account of type = Quick View
On that new form, add a regular subgrid for the child (related) entity, format as usual, choose an appropriate view for it etc.
(Tip: Edit the form properties to give it a useful name, not just "New Form")
Now on the form for the child entity, add the Quick View form in and link it to the lookup field for the Account. When you choose an Account, it will display the Quick View form, which in turn displays the sub-grid.
Some points here:
Upvotes: 1
Reputation: 23300
THIS ARTICLE says that it's doable, not much different than a custom lookup:
(*) The linked page's code usesdocument.getElementById
which is unsupported, YMMV (I'd try and see if the same result is achievable through Xrm.Page.controls.get()
)
Upvotes: 0