2014-07-01 22 views
0

我在我的測試環境(但在生產環境中也是如此)提前搜索PhoneCall實體時遇到問題。我不使用英文版,所以不是截圖,我會描述一切。客戶關係管理2011 - 在PhoneCall實體上預先搜索時出錯

嘗試使用定義的非空ToRecipent查找所有PhoneCalls。

下載FetchXML:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> 
    <entity name="phonecall"> 
    <attribute name="subject" /> 
    <attribute name="statecode" /> 
    <attribute name="prioritycode" /> 
    <attribute name="scheduledend" /> 
    <attribute name="regardingobjectid" /> 
    <attribute name="rlpl_status" /> 
    <attribute name="directioncode" /> 
    <attribute name="phonenumber" /> 
    <attribute name="ownerid" /> 
    <attribute name="to" /> 
    <order attribute="subject" descending="false" /> 
    <link-entity name="activityparty" from="activityid" to="activityid" alias="aa"> 
     <filter type="and"> 
     <condition attribute="participationtypemask" operator="eq" value="2" /> 
     <condition attribute="partyid" operator="not-null" /> 
     </filter> 
    </link-entity> 
    </entity> 
</fetch> 

相反的結果,我可以看到現場的標準意外錯誤。我已運行CRM 2011的診斷工具,可以讀出所發生的事情有,發現這個異常select語句後:

Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. 
    at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) 
    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
    at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values) 
    at Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider) 
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) 
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) 
Inner Exception: System.NullReferenceException: Object reference not set to an instance of an object. 
    at Microsoft.Crm.ObjectModel.CommunicationActivityServiceBase.RetrieveMultiple(EntityExpression entityExpression, ExecutionContext context) 

我執行數據庫相同的查詢,併成功返回的結果。看起來CRM在加載和轉換這些信息方面存在問題。 我發現與其他2個自定義鏈接實體一樣,提前搜索Phonecall實體的相同錯誤,但其餘的看起來很好。

更多... 我從高級搜索中刪除了ToRecipent列,結果顯示出來,但是無論我點擊它們多少次,我都無法打開它們中的任何一個。

下載FetchXML:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true"> 
    <entity name="phonecall"> 
    <attribute name="subject" /> 
    <attribute name="statecode" /> 
    <attribute name="prioritycode" /> 
    <attribute name="scheduledend" /> 
    <attribute name="regardingobjectid" /> 
    <attribute name="rlpl_status" /> 
    <attribute name="directioncode" /> 
    <attribute name="phonenumber" /> 
    <attribute name="ownerid" /> 
    <order attribute="subject" descending="false" /> 
    <link-entity name="activityparty" from="activityid" to="activityid" alias="ab"> 
     <filter type="and"> 
     <condition attribute="participationtypemask" operator="eq" value="2" /> 
     <condition attribute="partyid" operator="not-null" /> 
     </filter> 
    </link-entity> 
    </entity> 
</fetch> 

我甚至刪除了所有電話中,除了一個,以確保它不會與損壞的測試數據相關。 Still Exception出現了。怎麼了?

回答

0

這是微軟公司,所以通常情況下,這個問題已經解決,這要歸功於唯一的一個很好的解決方案:「關閉 - >打開」。

PhoneCall實體的高級搜索取決於高級搜索視圖。

我不知道爲什麼,但數據庫中的這個視圖被打破。

對於這樣的任何問題,CRM都有一個簡單的解決方案。添加任何列以查看,保存,發佈,刪除此列,保存,發佈。我們沒有改變,但是我們強制服務器重建數據庫中的視圖。

現在一切都很好。

乾杯。

相關問題