我参与过使用大量自定义视图的CRM 2011项目。
我最近发现所有查找自定义视图仅在Internet Explorer中正常工作。当我尝试使用谷歌浏览器(版本51.0.2704.84米)时,它很简单无效。
我用Google搜索没有运气。有人知道如何解决这个问题吗?
我相信很多人都面临同样的问题。
这是我的代码。我强调它在IE中就像一个魅力。
var viewId = "{1DFB2B35-B07C-44D1-868D-258DEEAB88E1}";
var entityName = "tz_tipodefrete";
var viewDisplayName = "Tipos de Frete Disponíveis";
var fetchXml =
"<fetch distinct='false' mapping='logical' output-format='xml-platform' version='1.0'>" +
"<entity name='tz_tipodefrete'>" +
"<attribute name='tz_name'/>" +
"<order descending='false' attribute='tz_ordem'/>" +
"<filter type='and'>";
if (filtrar)
fetchXml = fetchXml + "<condition attribute='tz_name' value='Cliente Retira e instala no CT' operator='ne'/>";
fetchXml = fetchXml +
"<condition attribute='statecode' value='0' operator='eq'/>" +
"</filter>" +
"</entity>" +
"</fetch>";
// build Grid Layout
var layoutXml = "<grid name='resultset' object='1' jump='tz_name' select='1' icon='1' preview='1'>" +
"<row name='result' id='tz_tipodefreteid'>" +
"<cell name='tz_name' width='600' />" +
"</row>" +
"</grid>";
Xrm.Page.getControl("tz_tipodefrete").addCustomView(viewId, entityName, viewDisplayName, fetchXml, layoutXml, true);
//Desabilita a opção do usuário trocar de view. Provável que pare de funcionar na migração para versão 2015
document.getElementById("tz_tipodefrete").setAttribute("disableViewPicker", "1");
答案 0 :(得分:1)
您是否尝试过取下guid的支架? 防爆。 var viewId =&#34; 1DFB2B35-B07C-44D1-868D-258DEEAB88E1&#34 ;; 在某些情况下,这会有所帮助。