查找字段的筛选-使用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'; ...
随机推荐
- 每日一题LeetCode 8. 字符串转换整数 (atoi)
问题描述 请你来实现一个 atoi 函数,使其能将字符串转换成整数. 首先,该函数会根据需要丢弃无用的开头空格字符,直到寻找到第一个非空格的字符为止. 当我们寻找到的第一个非空字符为正或者负号时,则将 ...
- MySQl看这一篇就够了
MySQL分享 一.数据库结构 语句 DDL(Data Definition Languages):数据定义语句,常用的语句关键字主要包括 create.drop.alter等操作表结构 DML(Da ...
- WGS84、WebMercator、GCJ02和BD09坐标系简介与转换
WGS84(GPS): 地心坐标系,空间直角坐标系,原点与地球质心重合,为GPS采用的坐标系,也是目前广泛使用的GPS全球卫星定位系统使用的坐标系. 通过GPS可以直接获取WGS84下的坐标(B,L, ...
- android 在基类activity中注册BroadcastReceiver,子activity类实现响应
android app 一般都会定义自己的BaseActivity, 如果各子Activity都需要接收广播但对广播的处理又不同时,可以考虑在BaseActivity中注册BroadcastRecei ...
- React中条件渲染
17==> 条件渲染 state初始化一般写在构造器当中 CharShop.js如下 import React, { Component } from "react"; ex ...
- All 432 functions were compiled because no usable IPDB/IOBJ from previous compilation was found
解决方法: 将: 链接器——>优化——>链接时间代码生成——>使用快速链接时间代码生成(/LTCG:incremental). 改为: 链接器——>优化——>链接时间代码 ...
- Java Web 学习(2) —— JSP
JSP 一. 什么是 JSP JSP 和 Servlet Servlet 有两个缺点是无法克服的:首先,写在 Servlet 中的所有 HTML 标签必须包含 Java 字符串,这使得处理HTTP响应 ...
- Idea的Http测试支持(十二)
1. 在Tools > HTTP Client > Test RESTful Web Service 打开窗口 窗口信息如下: 2. 在Host里面填写接口请求的服务器ip地址和端口,pa ...
- Where does Oracle SQL Developer store connections? oracle SQL Developer 连接信息保存的位置,什么地方
oracle SQL Developer 连接信息保存的位置,在什么地方? 在切换登录用户后,oracle SQL Developer 连接信息不见了.只要以前的用户信息还存在,可以在路径 C:\Us ...
- As Simple as One and Two
time limit per test3 secondsmemory limit per test256 megabytesinput: standard inputoutput: standard ...