zoukankan      html  css  js  c++  java
  • Microsoft Dynamics CRM 4.0 实体的联查

      ConditionExpression cond = new ConditionExpression();
                 cond.AttributeName = "new_nsrsbh";
                 cond.Values = new object[] { "21010277460473X" };
                 FilterExpression filter = new FilterExpression();
                 filter.Conditions = new ConditionExpression[] { cond };
                 filter.FilterOperator = LogicalOperator.And;
                 
                 LinkEntity link =new LinkEntity ();
                 link.LinkFromEntityName = EntityName.new_dj_kh_hykxx.ToString();
                 link.LinkFromAttributeName = "new_contactid";
                 link.LinkToEntityName = EntityName.account.ToString();
                 link.LinkToAttributeName = "primarycontactid";
                 link.LinkCriteria = filter;
    
                 QueryExpression query = new QueryExpression();
                 query.EntityName = EntityName.new_dj_kh_hykxx.ToString();
                 query.ColumnSet = new AllColumns();
                 
             
                 
    
                 query.LinkEntities = new LinkEntity[] { link };
                
    
                 BusinessEntityCollection entity = service.RetrieveMultiple(query);
                 new_dj_kh_hykxx hyk = (new_dj_kh_hykxx) entity.BusinessEntities[0];
                
    
  • 相关阅读:
    c#配置文件
    C#预处理指令
    C#面向对象详解
    231. Power of Two
    226. Invert Binary Tree
    C语言函数入参压栈顺序为什么是从右向左?
    对C++ 虚函数的理解
    悲观锁和乐观锁
    什么是索引
    CHAR 和VARCHAR的区别
  • 原文地址:https://www.cnblogs.com/hellohongfu/p/1739570.html
Copyright © 2011-2022 走看看