查找字段的筛选-使用addCustomView
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复231或者20161031可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me 。



配置好后当然要点击 结果 查看结果是不是对的,我这里如下,是对的:


<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
<entity name="ly_district">
<attribute name="ly_districtid" />
<attribute name="ly_name" />
<attribute name="ly_districtno" />
<attribute name="ly_parentdistrict" />
<order attribute="ly_name" descending="false" />
<link-entity name="ly_district" from="ly_districtid" to="ly_parentdistrict" alias="bg">
<link-entity name="account" from="ly_district" to="ly_districtid" alias="bh">
<filter type="and">
<condition attribute="accountid" operator="eq" uiname="Adventure Works (示例)" uitype="account" value="{C223165A-3AA3-E511-80C7-000D3A807EC7}" />
</filter>
</link-entity>
</link-entity>
</entity>
</fetch>
<grid name="resultset" object="10067" jump="ly_name" select="1" icon="1" preview="1">
<row name="result" id="ly_districtid">
<cell name="ly_name" width="125" />
<cell name="ly_parentdistrict" width="125" />
<cell name="ly_districtno" width="125" />
</row>
</grid>

Xrm.Page.getControl("ly_district").addCustomView("{6753B0C9-0B8C-431B-8E96-44D1D4EF6A06}", "ly_district", '地区筛选视图', "<fetch version='1.0' output-format='xml-platform' mapping='logical' distinct='false'><entity name='ly_district'><attribute name='ly_districtid'/><attribute name='ly_name'/><attribute name='ly_districtno'/><attribute name='ly_parentdistrict'/><order attribute='ly_name' descending='false'/><link-entity name='ly_district' from='ly_districtid' to='ly_parentdistrict' alias='bg'><link-entity name='account' from='ly_district' to='ly_districtid' alias='bh'><filter type='and'><condition attribute='accountid' operator='eq' value='" + (Xrm.Page.getAttribute("ly_lookup").getValue() ? Xrm.Page.getAttribute("ly_lookup").getValue()[0].id : "00000000-0000-0000-0000-000000000000") + "'/></filter></link-entity></link-entity></entity></fetch>", "<grid name='resultset' object='10067' jump='ly_name' select='1' icon='1' preview='0'><row name='result' id='ly_districtid'><cell name='ly_name' width='125'/><cell name='ly_parentdistrict' width='125'/><cell name='ly_districtno' width='125'/></row></grid>", true);
Xrm.Page.getControl("ly_district").setDefaultView("{6753B0C9-0B8C-431B-8E96-44D1D4EF6A06}");

查找字段的筛选-使用addCustomView的更多相关文章
- mysql通过字段注释查找字段名称
原文:mysql通过字段注释查找字段名称 有时候表的字段太多,只是大致记得表的注释,想通过字段注释查找字段名称,可以用如下语句: SELECT COLUMN_NAME,column_comment F ...
- openEntityForm时候如何给关于(regardingobjectid)类型查找字段赋值?
本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复264或者20170924可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me ...
- Dynamics 365中使用Web API将查找字段的值设置为空值的方法。
摘要: 本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复270或者20180424可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyon ...
- Dynamics CRM2016 Web Api之查询查找字段的相关属性
之前有篇博文介绍了如何获取查找字段的name值(跳转),本篇在此基础上再延伸下,实现的效果类似于EntityReference,可以取到查找字段的id,name,localname. 这里我以客户实体 ...
- Dynamics CRM2016 Web API之删除单个查找字段值
之前的博文中有介绍过,Web Api中的一个删除单个属性的Api但没提供查找字段的删除方法,本篇补充上,这里给出的示例代码是C#的(主要看url的拼接),看下url中最后的/$ref,这个标示表明了当 ...
- openEntityForm如何给关于(regardingobjectid)类型查找字段赋值?
本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复264或者20170924可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me ...
- Sed+Grep 快速替换查找字段(批量替换字符串)
格式: sed -i "s/查找字段/替换字段/g" `grep 查找字段 -rl路径` 命令分解: grep 查找字段 -rl路径 列出”路径”中” 查找字段” 的所有文件 ...
- mysql通过字段凝视查找字段名称
有时候表的字段太多.仅仅是大致记得表的凝视,想通过字段凝视查找字段名称,能够用例如以下语句: SELECT COLUMN_NAME,column_comment FROM INFORMATION_SC ...
- ORACLE 查找字段在哪些表里存在
查找不是主键的字段在哪些表里存在: select owner, table_namefrom dba_tab_columnswhere lower(column_name)='firstname'; ...
随机推荐
- ABAP - AT END OF 的使用
TYPES: begin of ty_tab , num() type i, str() type c, end of ty_tab. data: gw_tab TYPE ty_tab , gt_ta ...
- js闭包计数器及闭包的思考
//定义自增计数器,初始值是0,步长是1 var add = (function(){ var counter =0; return function () {counter += 1; return ...
- Swift实战技巧
Swift实战技巧 从OC转战到Swift,差别还是蛮大的,本文记录了我再从OC转到Swift开发过程中遇到的一些问题,然后把我遇到的这些问题记录形成文章,大体上是一些Swift语言下面的一些技巧,希 ...
- linux学习(八)Shell中变量的数学运算
目录 常见的运算符 expr命令 @(Shell中变量的数学运算) 常见的运算符 环境变量 说明 + 加 - 减 * 乘 / 除 % 取模 因为Shell中将*作为通配符使用, expr命令 expr ...
- docker 修改镜像和容器的存放路径(最新自己实践了第三种方法)
docker info :查看docker的存储等相关信息. 将路径修改至挂载磁盘中 前提:磁盘已挂载成功 方法一: 1.停止docker 服务 service docker stop 2.备份数据到 ...
- MySQL数据库(二)事务
MySQL的存储引擎InnoDB支持事务,MyISAM不支持事物 数据库事务的四大特性(ACID) 原子性(atomic) 原子性是指事务包含的所有操作要么全部成功,要么全部失败回滚,这和前面两篇博客 ...
- ssm所需依赖
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/20 ...
- python保护变量(_),私有变量(__),私有方法,
上图为常规代码 私有变量(__),私有方法:只是解释器换名字了,可以通过方法/实例字典发现改后的名字: 保护变量,解释器不做任何处理:只是开发者约定的,尽量不要改动: 此时实例无法修改__age属性值 ...
- apache配置文件说明及一些指令
httpd命令和apachectl命令 [root@localhost ~]# httpd -h Usage: httpd [-D name] [-d directory] [-f file] [-C ...
- shell 下
一句话来概括shell shell是一个基于Linux内核和应用程序之间的一个解释器 Shell解释器 /bin/sh /bin/bash 目前多用的是bash /sbin/ ...