Dynamics 365 OP 导出Excel数据报错
现状:导出Excel报错;

在服务器事件查看器:
The Web Service plug-in failed in OrganizationId: 5e1cd99d-b159-e911-a12d-005056896959; SdkMessageProcessingStepId: 8ad3883a-92e9-4d4c-837e-74a85a9628c6; EntityName: none; Stage: 30; MessageName: ExportToExcel; AssemblyName: Microsoft.Crm.Extensibility.InternalOperationPlugin, Microsoft.Crm.ObjectModel, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35; ClassName: Microsoft.Crm.Extensibility.InternalOperationPlugin; Exception: Unhandled Exception: System.Reflection.TargetInvocationException: 调用的目标发生了异常。
在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
在 System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
在 Microsoft.Crm.Extensibility.InternalOperationPlugin.Execute(IServiceProvider serviceProvider)
在 Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
在 Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
Inner Exception: System.NullReferenceException: 未将对象引用设置到对象的实例。
在 Microsoft.Crm.ObjectModel.CrmTableAdapter.Row.get_Item(IColumn column)
在 Microsoft.Crm.ObjectModel.CrmTableAdapter.Row.GenerateChecksum(IEnumerable`1 columns)
在 Microsoft.Crm.ObjectModel.CrmTableAdapter.GenerateRows()
在 Microsoft.Crm.ObjectModel.CrmTableAdapter.get_Rows()
在 Microsoft.Xrm.Office.ExcelGenerator..ctor(ISpreadsheet spreadsheet, ITemplate template, Boolean enableExcelTemplatePerfFix)
在 Microsoft.Crm.ObjectModel.ExcelService.GenerateXlsx(CrmTableAdapter crmTableAdapter, ITemplate template, ExecutionContext executionContext)
在 Microsoft.Crm.ObjectModel.ExcelService.<>c__DisplayClass5_0.<ExportToExcelInternal>b__0()
在 Microsoft.Crm.Extensibility.PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)
在 Microsoft.Crm.ObjectModel.ExcelService.ExportToExcelInternal(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
在 Microsoft.Crm.ObjectModel.ExcelService.ExportToExcel(EntityReference view, String fetchXml, String layoutXml, String queryApi, InputArgumentCollection queryParameters, ExecutionContext executionContext)
.
处理过程:
1、通过筛选数据,发现导出某个单据有问题,其他都没问题
2、后续回忆操作,这个单据有一个多选选项集,之前自定义设置里面加了一个选项,在单据也选上,但是后面在自定义设置里面删删除了这个选项
3、针对这个单据,这个多选字段清除,再选上保存
4、就可以正常导出

浙公网安备 33010602011771号