我在工作流程中使用此处显示的代码,但是当我运行它时,始终出现以下错误:
''Contact'实体不包含Name ='']的属性>
List<Guid> PPLyonIds = new List<Guid>(); QueryExpression qe = new QueryExpression(Personne_physique.EntityLogicalName); qe.ColumnSet = new ColumnSet("contactid"); qe.Criteria.AddCondition("fullname", ConditionOperator.In, nomsprenomscpdevtry.Cast<Object>().ToArray()); EntityCollection res = organisationProxy.RetrieveMultiple(qe); IEnumerable<Personne_physique> personnes = res.Entities.Select(x => x.ToEntity<Personne_physique>()); PPLyonIds = personnes.Select(x => x.Id).ToList<Guid>(); logger.Debug(" nombre des ids" + PPLyonIds.Count); List<Guid> respIds = new List<Guid>(); QueryExpression qee = new QueryExpression(Reponse_de_campagne.EntityLogicalName); qee.ColumnSet = new ColumnSet("activityid"); LinkEntity personnePhyLink = qee.AddLink("contact", "contactid", "new_personnephysiquecible"); FilterExpression filter = personnePhyLink.LinkCriteria.AddFilter(LogicalOperator.And); filter.AddCondition("contactid", ConditionOperator.In, PPLyonIds.Cast<Object>().ToArray()); filter.AddCondition("activityid", ConditionOperator.Equal, Guid.Parse("4B90DEA4-680C-EA11-80FE-005056B14DD3")); qee.Criteria.AddFilter(filter); qee.LinkEntities.Add(personnePhyLink); EntityCollection rese = organisationProxy.RetrieveMultiple(qee); IEnumerable<Reponse_de_campagne> reponses = rese.Entities.Select(x => x.ToEntity<Reponse_de_campagne>()); respIds = reponses.Select(y => y.Id).ToList(); logger.Debug(" nombre des ids" + respIds.Count);
并且在我的FetchXML中,这是代码
<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="false">
<entity name="campaignresponse">
<attribute name="subject" />
<attribute name="regardingobjectid" />
<attribute name="customer" />
<attribute name="new_activitedecampagneparente" />
<attribute name="new_retoursouscription" />
<attribute name="new_concretisationtousproduits" />
<attribute name="new_concretisation" />
<order attribute="subject" descending="false" />
<link-entity name="contact" from="contactid" to="new_personnephysiquecible" alias="ab" />
</entity>
</fetch>
````
Cordially
我在工作流程中使用此处显示的代码,但是在运行它时,我不断收到以下错误:'Contact'实体不包含名称为=“ List