bcolpaert / Colso.Xrm.DataTransporter

XrmToolbox plugin to help you to transfer records across organizations
MIT License
21 stars 15 forks source link

Filter condition on linked entity doesn't work #35

Open JensBorowy opened 5 years ago

JensBorowy commented 5 years ago

Hello,

it seems like it is not possible to filter on a linked entity. I tried this filter expression:

<filter type="and">
  <condition attribute="mop_name" operator="like" value="a%" />
</filter>
<link-entity name="contact" from="contactid" to="mop_contactid" alias="am">
  <filter type="and">
    <condition attribute="statecode" operator="eq" value="0" />
    <condition attribute="firstname" operator="like" value="a%" />
  </filter>
</link-entity>

This is the error message:

Translation:"Es sind mehrere Stammelemente vorhanden. Zeile 8, Position 6" means "System.Xml.XmlException: There are multiple root elements. Line 8, postition 6"

System.Xml.XmlException: Es sind mehrere Stammelemente vorhanden. Zeile 8, Position 6. bei System.Xml.XmlTextReaderImpl.Throw(Exception e) bei System.Xml.XmlTextReaderImpl.ParseDocumentContent() bei System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace) bei System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc) bei System.Xml.XmlDocument.Load(XmlReader reader) bei System.Xml.XmlDocument.LoadXml(String xml) bei Colso.DataTransporter.AppCode.EntityRecord.BuildFetchXml(String entityLogicalName, String[] columns, String filter) bei Colso.DataTransporter.AppCode.EntityRecord.RetrieveData() bei Colso.DataTransporter.DataTransporter.<>c__DisplayClass57_0.b__0(Object sender, DoWorkEventArgs e) bei System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e) bei System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

Thanks in advance

With kind regards

Jens

bcolpaert commented 5 years ago

Hi Jens,

At the moment, this isn't supported. However, I will put it on my todo list :)

KR, Bram

18221616791 commented 3 years ago

Hi Jens,

At the moment, this isn't supported. However, I will put it on my todo list :)

KR, Bram

Hi guys, I think it can be fixed by follows image