【问题标题】:CRM 2011 - Error in advance search on PhoneCall entityCRM 2011 - PhoneCall 实体的提前搜索错误
【发布时间】:2014-10-23 17:52:08
【问题描述】:

我在我的测试环境中遇到了提前搜索 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 个自定义链接实体相同的错误,但其余的看起来都很好。

还有什么... 我从 Advance Search 中删除了 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>

我什至删除了除一个之外的所有电话呼叫,以确保它与损坏的测试数据无关。仍然出现异常。怎么了?

【问题讨论】:

    标签: dynamics-crm-2011 crm


    【解决方案1】:

    它是微软,因此问题像往常一样得到了解决,这要归功于唯一一个解决所有问题的好方法:“关闭 --> 打开”。

    PhoneCall 实体的高级搜索依赖于高级搜索视图。

    我不知道为什么,但是数据库中的这个视图被破坏了。

    对于此类问题,CRM 中有一个简单的解决方案。添加任何列以查看、保存、发布、删除此列、保存、发布。我们没有做任何更改,但我们强制服务器在数据库中重建视图。

    现在一切都很好。

    干杯。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-09-22
      • 1970-01-01
      相关资源
      最近更新 更多