dynamics crm 2011 - fetchXml: How to select accounts that *don't *have link entities of a specific type -
i want select accounts not n:n-related specific entity using fetchxml. tried following:
<fetch mapping="logical" count="50" version="1.0"> <entity name="account"> <attribute name="name" /> <order attribute="name" /> <link-entity name="xy_accounthierarchynode" from="xy_accountid" to="accountid" link-type="outer"> <filter> <condition attribute="xy_accounthierarchynodeid" operator="null" /> </filter> </link-entity> </entity> </fetch>
the expected result of query acounts don't have related xy_accounthierarchynode. receive accounts. filter conditions seems ignored...
what did wrong?
bad news not possible in crm 2011. getting accounts because using "outer" join.
there have been couple of creative ways of getting around this. example accounts or contacts without opportunities use marketing list approach described in this blog post.
good news crm 2013 released next month supports "left outer" joins give functionality looking for.
Comments
Post a Comment