This project has moved. For the latest updates, please go here.

Fix to support Link Entities

Jan 15, 2016 at 12:31 PM
HI,

May I suggest the following quick fix to support link entites in version 3.x.
Added two statements to extract the linkrequest part of the FetchXML at the beginning.
And at the end, reinject that linkentity portion when replacing the Filter token.

In the dd_chartmap.htm
        function buildFetchXML(fetchXMLString) {
            var result = DataDescription.fetchXML;
                            var linkentityrequest = fetchXMLString.match(/<link-entity.*<\/link-entity>/);
                            if (linkentityrequest != null && linkentityrequest != "") fetchXMLString = fetchXMLString.replace(linkrequest,"");

            // TODO: use XPATH for this (dd_xmlparser.js)
            // 1. remove all attribute nodes
            // 2. add our address attributes
            // everything else stays the same, except maybe page/count

            if (!PresentationDescription.ShowAllRecords) {  // If showallrecords is true, then it will already be defaulted to "count=5000" and "page=1"
                result = result.replace('count="250"', fetchXMLString.match(/count=".*?"/));
                result = result.replace('page="1"', fetchXMLString.match(/page=".*?"/));
            }

            result = result.replace("<order/>", fetchXMLString.match(/<order.*?\/>/));
            result = result.replace("<filter/>", fetchXMLString.match(/<filter.*<\/filter>/)+linkentityrequest);  

            return result;
        }
Regards,

Ag
Coordinator
Mar 14, 2016 at 5:48 PM
There can be multiple Link Entity filters, and they can be nested. Do you know if this works in those scenarios?
Sep 28, 2016 at 11:06 AM
agentilc

I have just started a discussion;

Hi,

First of all thanks for the Mapping feature, we love it here.

We do have an issue with Views which have a joined query, for example the 'Active Accounts' view works perfectly and shows all the accounts.
However our 'My Active Accounts' view doesn't and I believe this is down to our query & joins within the view.
Account(Entity)->Protection Sales Panel(Entity) -> Account Managers (User Entity) -> User equals Current User
I have tried views with a simple one join and the map does not render, is there something I can adjust in the code to make this work? I did see the following but not sure;
https://crmmapchart.codeplex.com/discussions/650087
Regards
Graham
  • Would your solution above solve my issue?