Hi,
I want to add a custom filter and layout to a subgrid in CRM. I have done this several times before with javascript but now it seems like this functionality has been removed.
All I can find is "setCurrentView" for subgrids. But as I interperet this I can only change between existing views.
What I want to accomplish:
I have three entities:
- Account
- HelpText
- MarketingArea
On the Account entity I want to display a subgrid thats showing all HelpTexts thats connected to the Account. I also want to show all HelpText thats connected to the same MarketingArea thats set in a lookup on Account.
Above text explained in javascript/fetchXml:
var accountId = "57b1950f-f7a2-4aad-a15b-138fdf99bdce";
var marketingAreaId = "8d88b2f8-ff21-4970-9d99-fb5c0bddcfc5";
var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'>";
fetchXml += "<entity name='x_helptext'>";
fetchXml += "<attribute name='x_name' />";
fetchXml += "<filter type='or'>";
fetchXml += "<condition attribute='x_accountid' operator='eq' value='" + accountId + "' />";
fetchXml += "<condition attribute='x_marketingareaid' operator='eq' value='" + marketingAreaId +"'/>";
fetchXml += "</filter>";
fetchXml += "</entity>";
fetchXml += "</fetch>";
Anyone have an idea on how to accomplish this?
Thanks in advanced!