2016-11-29 52 views
0

我的组织已从CRM 2011升级到CRM 2016 SP1。CRM 2016“CRM参数筛选器 - 无效的参数”

在CRM 2011中,我们为几个不支持该功能的表单添加了一个自定义的“查找地址”按钮。

当然,升级后,此代码停止运行,我一直在尝试更新它。最初,在升级之后,按钮并没有做任何事情。但是,进行一些更改后,按钮“有效”,但会产生以下错误。

<?xml version="1.0"?> 
 

 
-<error xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> 
 

 
<exception>Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C1D5F608Detail: <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts"> <ErrorCode>-2147220970</ErrorCode> <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" /> <Message>System.InvalidOperationException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C1D5F608</Message> <Timestamp>2016-11-29T19:51:26.801987Z</Timestamp> <InnerFault i:nil="true" /> <TraceText i:nil="true" /> </OrganizationServiceFault> </exception> 
 

 
<parameters xsi:nil="true"/> 
 

 
<displaytitle/> 
 

 
<displaytextencoded/> 
 

 
<displaytext/> 
 

 
<description>CRM Parameter Filter - Invalid parameter 'headerForm=1' in Request.QueryString on page /CRMTest/Handlers/WebResource.ashx The raw request was 'GET /CRMTest/{636160451970000359}/WebResources/CRMTest/sfa/quotes/dlg_lookupaddress.aspx?Data=LookupAddress&headerForm=1&parentId=%7bDB4A56CB-6809-E511-91A1-0050569C003F%7d&parentType=1&willCall=0' called from .</description> 
 

 
<file>Not available</file> 
 

 
<line>Not available</line> 
 

 
<details>Not available</details> 
 

 
<traceInfo/> 
 

 
<requesturl>http://azcrmdev/CRMTest/Handlers/WebResource.ashx?name=CRMTest/sfa/quotes/dlg_lookupaddress.aspx&Data=LookupAddress&headerForm=1&parentId=%7bDB4A56CB-6809-E511-91A1-0050569C003F%7d&parentType=1&willCall=0</requesturl> 
 

 
<pathAndQuery>/CRMTest/Handlers/WebResource.ashx?name=CRMTest/sfa/quotes/dlg_lookupaddress.aspx&Data=LookupAddress&headerForm=1&parentId=%7bDB4A56CB-6809-E511-91A1-0050569C003F%7d&parentType=1&willCall=0</pathAndQuery> 
 

 
<source>ASHX_XML</source> 
 

 
<stacktrace/> 
 

 
</error>

我已经使用“extraqs”参数“ encodeURIComponant”尝试,并甚至名称添加的参数的形式本身。这些都是我在研究中发现的所有可能的解决方案(包括这里的SO)。然而,大多数解决方案似乎都是针对2011年的。我也读过,这从升级到SP1以来可能根本不起作用。现在我已经轮了几天车轮。

任何有识之士将不胜感激。

这是我到目前为止的代码(违规代码行包含在“**”中)。

function CustomLookup() { 
 
    //debugger 
 
    //var aoItems = getFieldValue("customerid"); 
 
    var aoItems = Xrm.Page.getAttribute("customerid").getValue(); 
 

 
    if (aoItems == null) { 
 
     alert("Account is not Selected"); 
 
     return; 
 
    } 
 
    
 
    
 
    **var object = Xrm.Utility.openWebResource(Xrm.Page.context.prependOrgName("/sfa/quotes/dlg_lookupaddress.aspx?headerForm=1&parentType=1&parentId=" + aoItems[0].id + "&willCall=0"), "LookupAddress", 500, 330, true);** 
 
    //debugger 
 

 
    if (object) { 
 
     if (object.BillTo && object.ShipTo) { 
 
      retrieveRecordXrm(object.Address.AddressId, "CustomerAddressSet", populateBillShipAddress, retrievalFailed, true); 
 
     } 
 
     else if (object.BillTo) { 
 
      retrieveRecordXrm(object.Address.AddressId, "CustomerAddressSet", populateBillAddress, retrievalFailed, true); 
 
     } 
 
     else if (object.ShipTo) { 
 
      retrieveRecordXrm(object.Address.AddressId, "CustomerAddressSet", populateShipAddress, retrievalFailed, true); 
 
     } 
 
    } 
 
    
 
}

+0

你可以尝试使用上引用的标准按钮,使用开发工具来捕捉触发URL。自升级以来,很可能某个参数(headerForm)发生了变化... – Nathan

回答

-1

不能编辑表格添加查阅2016年?

下面的例子是从2015年开始采取的,但应该工作几乎同样的在2016年

添加OOB地址实体到命令栏

的OOB地址实体不会出现在命令栏上默认。

enter image description here

将其添加到命令栏,打开帐户表格。

enter image description here

点击顶部的“导航”按钮。

enter image description here

拖动从到左侧导航右侧的关系资源管理器的地址。保存并发布。

enter image description here

你的命令栏现在将显示地址。

enter image description here

则继续添加新地址,如果OOB地址实体是什么,你已经决定使用。

enter image description here

原贴&感谢“JoeCRM”:

http://www.powerobjects.com/2015/04/20/using-builtin-address-versus-custom-address-entity/