简体   繁体   English

使用Workflow Dynamics CRM 2016更改BPF阶段

[英]Change BPF Stage with Workflow Dynamics CRM 2016

We are currently on Dynamics 2016 on premise. 我们目前在内部使用Dynamics 2016。 We are following this article to set up a workflow to change the Stage on one of our business process flows. 我们下面这个文章,以建立工作流来改变我们的业务处理流程中的一个阶段。 The setup of our BPF is below. BPF的设置如下。 We are receiving the following error when the BPF runs. BPF运行时,我们收到以下错误。 I've narrowed this error down to somewhere in the Update Contract Setup Stage step. 在“更新合同设置阶段”步骤中,我已将此错误缩小到某个地方。 What are we missing here? 我们在这里想念什么? Perhaps we are trying to do something only available on D365? 也许我们正在尝试做仅在D365上可用的操作? Other attempts at changing the stage on a BPF include using the Web API (issues detailed here ) and using a trigger to set the database values (yes, we know this is not supported). 更改BPF阶段的其他尝试包括使用Web API(问题在此处详细介绍)和使用触发器来设置数据库值(是的,我们知道不支持此操作)。

Error 错误

Plugin Trace:

[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep3]



Error Message:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: An unexpected error occurred.Detail: 
<OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
  <ActivityId>bb2e54fb-674a-45b1-a715-3a61722ee875</ActivityId>
  <ErrorCode>-2147220970</ErrorCode>
  <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
  <Message>An unexpected error occurred.</Message>
  <Timestamp>2018-09-27T21:02:20.3406538Z</Timestamp>
  <ExceptionRetriable>false</ExceptionRetriable>
  <ExceptionSource i:nil="true" />
  <InnerFault>
    <ActivityId>bb2e54fb-674a-45b1-a715-3a61722ee875</ActivityId>
    <ErrorCode>-2147220970</ErrorCode>
    <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
    <Message>System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #66095F59</Message>
    <Timestamp>2018-09-27T21:02:20.3406538Z</Timestamp>
    <ExceptionRetriable>false</ExceptionRetriable>
    <ExceptionSource i:nil="true" />
    <InnerFault i:nil="true" />
    <OriginalException i:nil="true" />
    <TraceText i:nil="true" />
  </InnerFault>
  <OriginalException i:nil="true" />
  <TraceText>[Microsoft.Xrm.Sdk.Workflow: Microsoft.Xrm.Sdk.Workflow.Activities.UpdateEntity]
[UpdateStep3]
</TraceText>
</OrganizationServiceFault>
   at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
   at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
   at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Workflow Setup 工作流程设定

工作流程设定

Update Contract Setup Step 更新合同设置步骤

更新合同设置步骤

I'm not sure if you can do this directly, but i used in the past Dynamics Workflow Tools which have a lot of functions which you can call from a workflow. 我不确定是否可以直接执行此操作,但是我过去使用过Dynamics Workflow Tools ,该工具具有很多可以从工作流中调用的功能。 For BPF Stage you can use "Set Process Stage" Method. 对于BPF阶段,可以使用“设置过程阶段”方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM