我们可以使用Command来实现快速获取custom entity的值.

创建cmd  并且在nuget中引用 CRMSDK

复制下面的代码.

userName 为登陆CRM的email

password 为登陆CRM密码

url 是 svc

可以在这里找到: Settings -> Customizations -> Developer Resources -> Organization Source

    public class RetrieveCustomEntities
{
public OrganizationServiceProxy serviceProxy { get; set; } public void RetrieveustomEntity()
{
var clientCredentials = new ClientCredentials();
// input the user name
clientCredentials.UserName.UserName = "your user name";
// input the pass word
clientCredentials.UserName.Password = "Your Password"; // input your instance svc url
using (serviceProxy = new OrganizationServiceProxy(new Uri("url"), null, clientCredentials, null))
{
serviceProxy.EnableProxyTypes();
// input the logical name of the entity
var query = new QueryExpression("entity logical name");
query.ColumnSet = new ColumnSet();
query.ColumnSet.AddColumn("condition");
var retrievedValue = serviceProxy.RetrieveMultiple(query);
}
}
}

最新文章

  1. centos6.3与jexus5.4.4配置支持php(wordpress)
  2. Salesforce Apex 开发环境设置和Hello World示例
  3. Python3学习(二)-递归函数、高级特性、切片
  4. 字符串匹配算法——KMP算法
  5. C#GDI+基础(三)画刷详解
  6. Swift3.0语言教程使用指针创建和初始化字符串
  7. 论文笔记之:Speed Up Tracking by Ignoring Features
  8. Android QQ空间浏览图片动画特效的实现(※)
  9. phpcms v9
  10. 解决弹出的窗口window.open会被浏览器阻止的问题(自定义open方法)
  11. 使用JMeter做压力测试
  12. MySql移植到嵌入式Linux平台
  13. List列表 OrderBy
  14. instanceof问题
  15. css文本超出省略号
  16. qemu与libvirt编译与安装
  17. pageadmin CMS自助建站系统教程:模板中执行sql语句
  18. Windows 7 上面安装 dotnet core 之后 使用 应用报错的处理:api-ms-win-crt-runtime-l1-1-0.dll 丢失
  19. 洛谷 P4112 [HEOI2015]最短不公共子串 解题报告
  20. SQL Server 登录名、服务器角色、用户名和数据库角色 --- 解释

热门文章

  1. 游戏《Minecraft》或其他应用程序 实现 自动更新 客户端版本
  2. 特殊字符,如Emoji表情Base64存储到数据库
  3. 【Linux】Terminal中输入一行命令快速移动光标至行首行尾
  4. Visual Studio Team Services使用教程【2】:添加团队成员
  5. Elasticsearch慢查询故障诊断
  6. 0006 列表(ul、ol、dl)
  7. jsp中点击一个图片跳转到另一个页面的方法
  8. Mysql 字段类型与约束条件
  9. selenium自动化之xpath定位*必会技能*
  10. React Native 性能优化指南【全网最全,值得收藏】