注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

微软MVP罗勇的博客

微软MVP罗勇,www.luoyong.me

 
 
 

日志

 
 

如何解决Dynamics 365导出传递规则集失败的问题  

2017-05-02 22:56:52|  分类: Q&A |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
关注本人微信和易信公众号: 微软动态CRM专家罗勇 ,回复253或者20170502可方便获取本文,同时可以在第一间得到我发布的最新的博文信息,follow me!我的网站是 www.luoyong.me 。
升级Dynamics 365 (版本1612,V8.2.0.749)以后发现解决方案中如果有 传递规则集 ,那么导出失败。
如何解决Dynamics 365导出传递规则集失败的问题 - 罗勇 - 微软MVP罗勇的博客
 
如何解决Dynamics 365导出传递规则集失败的问题 - 罗勇 - 微软MVP罗勇的博客

升级之前是不会存在这个问题的,十有八九是升级后产品BUG。那么怎么解决呢?点击上面的显示技术详细信息链接也没有提供任何更多有用的信息,这个时候就是上服务器上查看日志的好时机了。我这里是根据 Monitor and troubleshoot Microsoft Dynamics 365 时候用PowerShell来启用部署场级别(deployment-level)的跟踪(tracing)。
应该是登录到CRM部署服务所在的服务器,这个服务器如果按照IG中的安装方法来安装,它是和前端服务器角色在同一台服务器上。使用管理员权限打开PowerShell,我这里启用最高级别的追踪,并且将CallStack到日志中,也更改了日志的存放目录,每个日志文件的大小。

Add-PSSnapin Microsoft.Crm.PowerShell
$Setting = Get-CrmSetting TraceSettings
$Setting.Enabled = $True
$Setting.CallStack=$True
$Setting.Categories="*:Verbose"
$Setting.FileSize=30
$Setting.Directory="C:\Program Files\Microsoft Dynamics CRM\Trace"
Set-CrmSetting $Setting


然后就是重现错误查看日志,重现错误后一般应该及时关闭跟踪,免得更多的日志扰乱视线,命令如下:

$Setting = Get-CrmSetting TraceSettings
$Setting.Enabled = $False
Set-CrmSetting $Setting

如何解决Dynamics 365导出传递规则集失败的问题 - 罗勇 - 微软MVP罗勇的博客
 
这里搜索日志文件名包括 CRMWeb 的那些日志文件,我使用 Level: Error 去搜索,会找到类似如下的日志:
>select
"workflow0".TriggerOnUpdateAttributeList as "triggeronupdateattributelist"
, "workflow0".BusinessProcessType as "businessprocesstype"
, "workflow0".PluginTypeId as "plugintypeid"
, "workflow0".ProcessOrder as "processorder"
, coalesce("LL0".Label,"workflow0".Name ) as "name"
, "workflow0".TriggerOnCreate as "triggeroncreate"
, "workflow0".Mode as "mode"
, "workflow0".Rank as "rank"
, "workflow0".IsManaged as "ismanaged"
, "workflow0".ProcessRoleAssignment as "processroleassignment"
, "workflow0".FormId as "formid"
, "workflow0".AsyncAutoDelete as "asyncautodelete"
, "workflow0".ModifiedBy as "modifiedby"
, "workflow0".WorkflowIdUnique as "workflowidunique"
, "workflow0".ModifiedOnBehalfBy as "modifiedonbehalfby"
, "workflow0".Xaml as "xaml"
, "workflow0".ModifiedOn as "modifiedon"
, "workflow0".DeleteStage as "deletestage"
, "workflow0".ActiveWorkflowId as "activeworkflowid"
, "workflow0".SolutionId as "solutionid"
, "workflow0".CreateStage as "createstage"
, "workflow0".OwningTeam as "owningteam"
, "workflow0".CreatedBy as "createdby"
, "workflow0".Subprocess as "subprocess"
, "workflow0".PrimaryEntity as "primaryentity"
, "workflow0".StateCode as "statecode"
, "workflow0".OwningUser as "owninguser"
, "workflow0".IsCrmUIWorkflow as "iscrmuiworkflow"
, "workflow0".RunAs as "runas"
, "workflow0".RendererObjectTypeCode as "rendererobjecttypecode"
, "workflow0".CreatedOnBehalfBy as "createdonbehalfby"
, "workflow0".StatusCode as "statuscode"
, "workflow0".ParentWorkflowId as "parentworkflowid"
, "workflow0".OwnerId as "ownerid"
, "workflow0".Category as "category"
, "workflow0".Type as "type"
, "workflow0".TriggerOnDelete as "triggerondelete"
, "workflow0".UpdateStage as "updatestage"
, "workflow0".OwningBusinessUnit as "owningbusinessunit"
, "workflow0".IntroducedVersion as "introducedversion"
, "workflow0".WorkflowId as "workflowid"
, "workflow0".OnDemand as "ondemand"
, "workflow0".ClientData as "clientdata"
, "workflow0".Scope as "scope"
, "workflow0".InputParameters as "inputparameters"
, "workflow0".CreatedOn as "createdon"
, "workflow0".SyncWorkflowLogOnFailure as "syncworkflowlogonfailure"
, "workflow0".EntityImageId as "entityimageid"
, "workflow0".IsCustomizable as "iscustomizable"
, "workflow0".ComponentState as "componentstate"
, "workflow0".LanguageCode as "languagecode"
, "workflow0".IsTransacted as "istransacted"
, "workflow0".UniqueName as "uniquename"
, coalesce("LL1".Label,"workflow0".Description ) as "description"
, "workflow0".SdkMessageId as "sdkmessageid"
, convert(bigint, "workflow0".VersionNumber) as "versionnumber"
, "workflow0".EntityImage_Timestamp as "entityimage_timestamp"
, "workflow0".EntityImage_URL as "entityimage_url"
, "workflow0".EntityImage as "entityimage"
, "workflow0".ModifiedByName as "modifiedbyname"
, "workflow0".ModifiedByYomiName as "modifiedbyyominame"
, "workflow0".ModifiedOnBehalfByYomiName as "modifiedonbehalfbyyominame"
, "workflow0".ModifiedOnBehalfByName as "modifiedonbehalfbyname"
, coalesce("LL2".Label,"workflow0".ActiveWorkflowIdName ) as "activeworkflowidname"
, "workflow0".CreatedByYomiName as "createdbyyominame"
, "workflow0".CreatedByName as "createdbyname"
, "workflow0".CreatedOnBehalfByName as "createdonbehalfbyname"
, "workflow0".CreatedOnBehalfByYomiName as "createdonbehalfbyyominame"
, coalesce("LL3".Label,"workflow0".ParentWorkflowIdName ) as "parentworkflowidname"
, "workflow0".OwnerIdYomiName as "owneridyominame"
, "workflow0".OwnerIdName as "owneridname"
, "workflow0".OwnerIdType as "owneridtype"
, "workflow0".OwningBusinessUnitName as "owningbusinessunitname"
from
 Workflow as "workflow0"
 left outer join LocalizedLabelView as "LL0" on ("LL0".ObjectId = "workflow0".WorkflowId and "LL0".LanguageId = @LanguageId0 and "LL0".ObjectColumnName = @ObjectColumnName0 )
 left outer join LocalizedLabelView as "LL1" on ("LL1".ObjectId = "workflow0".WorkflowId and "LL1".LanguageId = @LanguageId1 and "LL1".ObjectColumnName = @ObjectColumnName1 )
 left outer join LocalizedLabelView as "LL2" on ("LL2".ObjectId = "workflow0".ActiveWorkflowId and "LL2".LanguageId = @LanguageId2 and "LL2".ObjectColumnName = @ObjectColumnName2 )
 left outer join LocalizedLabelView as "LL3" on ("LL3".ObjectId = "workflow0".ParentWorkflowId and "LL3".LanguageId = @LanguageId3 and "LL3".ObjectColumnName = @ObjectColumnName3 )
where
 ("workflow0".WorkflowId = @WorkflowId0)
[2017-05-02 21:43:13.028] Process: w3wp |Organization:bd2a5c49-6b08-4eda-8a15-84159d9fd349 |Thread:   59 |Category: Platform.ImportExportPublish |User: bef8b450-fb18-4078-a7ac-2b281e1cf051 |Level: Error |ReqId: 34f967ef-a774-41fe-ad38-1e6eeb1fc8c2 |ActivityId: 34f967ef-a774-41fe-ad38-1e6eeb1fc8c2 | WorkflowHandler.ExportItem  ilOffset = 0x43
 at WorkflowHandler.ExportItem(XmlDocument XDoc, XmlNode Node)  ilOffset = 0x43
 at RoutingRuleHandler.ExportWorkflow(XmlDocument importDocument, XmlNode RoutingRuleNode, BusinessEntity workflowEntity)  ilOffset = 0x4A
 at RoutingRuleHandler.ExportRuleDefinition(XmlDocument importDocument, XmlElement routingRuleElement)  ilOffset = 0x1D3
 at RoutingRuleHandler.ExportItem(XmlDocument importDocument)  ilOffset = 0x23
 at ExportHandler.Export(XmlDocument XDoc)  ilOffset = 0x32
 at RootExportHandler.RunExport()  ilOffset = 0x12E
 at ExportXmlService.ExportSolutionWithTargetVersion(String solutionName, Boolean managed, String targetVersion, Boolean exportAutoNumberingSettings, Boolean exportCalendarSettings, Boolean exportCustomizationSettings, Boolean exportEmailTrackingSettings, Boolean exportGeneralSettings, Boolean exportMarketingSettings, Boolean exportOutlookSynchronizationSettings, Boolean exportRelationshipRoles, Boolean exportIsvConfig, Boolean exportSales, Boolean exportExternalApplications, ExecutionContext context)  ilOffset = 0x136
 at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)  ilOffset = 0xFFFFFFFF
 at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)  ilOffset = 0x16
 at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)  ilOffset = 0x6C
 at LogicalMethodInfo.Invoke(Object target, Object[] values)  ilOffset = 0x3F
 at InternalOperationPlugin.Execute(IServiceProvider serviceProvider)  ilOffset = 0x43
 at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)  ilOffset = 0x0
 at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)  ilOffset = 0x64
 at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x93
 at Pipeline.Execute(PipelineExecutionContext context)  ilOffset = 0xDE
 at PipelineInstrumentationHelper.Execute(Boolean instrumentationEnabled, String stopwatchName, ExecuteWithInstrumentation action, PipelineExecutionContext context)  ilOffset = 0x35
 at MessageProcessor.Execute(PipelineExecutionContext context)  ilOffset = 0x218
 at InternalMessageDispatcher.Execute(PipelineExecutionContext context)  ilOffset = 0xE4
 at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion)  ilOffset = 0x22D
 at ExternalMessageDispatcher.Execute(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid callerRegardingObjectId, UserType userType, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId)  ilOffset = 0x0
 at OrganizationSdkServiceInternal.ExecuteRequestRequestWithInstrumentation(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode, Object operation, UserType targetUserType)  ilOffset = 0x0
 at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x4B
 at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode, ExecutionContext executionContext)  ilOffset = 0x0
 at InprocessServiceProxy.ExecuteCore(OrganizationRequest request)  ilOffset = 0x34
 at PlatformCommand.XrmExecuteInternal()  ilOffset = 0xBC
 at ExportSolutionCommand.Execute()  ilOffset = 0x0
 at ExportSolutionPage.ExportSolution(Boolean managed, String optionXml, String targetVersion)  ilOffset = 0x57
 at ExportSolutionPage.ConfigureForm()  ilOffset = 0xE2
 at AppUIPage.OnPreRender(EventArgs e)  ilOffset = 0x13
 at Control.PreRenderRecursiveInternal()  ilOffset = 0x52
 at Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  ilOffset = 0x6D3
 at Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)  ilOffset = 0x3C
 at Page.ProcessRequest()  ilOffset = 0x14
 at Page.ProcessRequest(HttpContext context)  ilOffset = 0x38
 at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()  ilOffset = 0x187
 at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)  ilOffset = 0x15
 at PipelineStepManager.ResumeSteps(Exception error)  ilOffset = 0x27A
 at HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)  ilOffset = 0x31
 at HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)  ilOffset = 0xB0
 at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x131
 at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0
 at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF
 at UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)  ilOffset = 0xFFFFFFFF
 at PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x1E7
 at PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)  ilOffset = 0x0
>Workflow export: FAILURE, workflow id 243ea7af-3994-4d47-875e-1989785f5030 name 测试传递规则集 : System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Crm.Tools.ImportExportPublish.WorkflowHandler.ExportItem(XmlDocument XDoc, XmlNode Node)
[2017-05-02 21:43:13.029] Process: w3wp |Organization:bd2a5c49-6b08-4eda-8a15-84159d9fd349 |Thread:   59 |Category: Platform.ImportExportPublish |User: bef8b450-fb18-4078-a7ac-2b281e1cf051 |Level: Error |ReqId: 34f967ef-a774-41fe-ad38-1e6eeb1fc8c2 |ActivityId: 34f967ef-a774-41fe-ad38-1e6eeb1fc8c2 | 

重要的内容见红色部分,当然用记事本来看和搜索日志可能不方便,可以使用 PFE CRM Trace Tool,打开日志效果如下所示:
如何解决Dynamics 365导出传递规则集失败的问题 - 罗勇 - 微软MVP罗勇的博客
 
通过google找到换一个帖子:Getting Error While Exporting All Customizations in Dynamics 365 (Version 8.2.0) ,情形非常类似,但是目前没有解决方案,所有我也没有解决。
本来预计4月底推出的Hotfix,V8.2.1,5月2日得到的消息延迟推出了,还不知道什么时候推出,也不知道是否否解决了这个BUG。
2017年5月3日,Microsoft Dynamics 365 更新 0.1 推出了,在这个补丁对应的知识库文章中明确有提到解决这个 问题:Export solution failed in RoutingRuleHandler.ExportWorkflow with Null System.NullReferenceException: Object reference not set to an instance of an object.
我下载安装后就解决这个问题了。安装后CRM的版本如下:
如何解决Dynamics 365导出传递规则集失败的问题 - 罗勇 - 微软MVP罗勇的博客
 
素格格新疆特产店--做新疆特产的搬运工。
本店由博主的新疆老婆开设,搬运各种上等的新疆特产,是自用,送礼,年货,孝敬长辈特别是(岳)父母的首选。
Dynamics CRM中的地址知多D? - 罗勇 - 微软MVP-罗勇的博客

  评论这张
 
阅读(140)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2018