Hi All,
I've been having issues with getting imported business rules (BR) to function for a couple of years now and thought it's finally time to seek some assistance (as opposed to recreating BRs all the time)!
Scenario 1: I have a BR setup in our dev environment, which toggles the visibility of Field A based on the Field B containing 'pick me' (a lookup value).
*** Assume that Field B exists in the test environment and is present on the main form, but set to not be visible by default ***
- I put the BR into a solution, export the solution, and import the solution into our test environment with no issues.
- When I go to the form to test out the new BR, the field doesn't appear as expected (when 'pick me' is selected in Field B).
- After checking the BR in the Default Solution, it appears there and is activated
- I deactivate the BR and then when trying to reactive it, receive a 'Error in Process Definition' error
- I go into the BR, identify the lookup field and "resolve/refresh" the lookup reference, after which I can activate the BR and all works as planned.
Scenario 2: I have another BR setup in our dev environment, but this one mas multiple nested conditions, and involves Recommendations. Recommendations become available for Field A, based on the value in Field B.
- The BR is packaged up into a solution, exported from Dev and imported into Test.
- When I go to the form to test out the new BR, the recommendations are not appearing as expected (not appearing at all).
- After checking the BR in the Default Solution, it appears there and is activated
- I deactivate the BR and then when trying to reactive it, receive a 'Error in Process Definition' error
- Looking for conditions and actions which involve a lookup reference, I identify the lookup fields and "resolve/refresh" the lookup reference, as I did to solve the previous issue, but this fails to resolve the issue in this scenario.
- Other steps taken to resolve the issue:
- Checked that the dependant field are present on the form
- Attempted to read through the error log to identify the issue but I couldn’t work it out
Request for help: To help me avoid having to recreate this BR again, and to help with these issues in future, can someone help me work out what’s going on here?
Error Log: Here is the error log
Unhandled exception:
Exception type: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]
Message: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: The selected workflow has errors and cannot be published. Please open the workflow, remove the errors and try again.
at Microsoft.Crm.Dialogs.ActivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #58051F99Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>1029c1e4-3085-4597-ad2d-61d5181fde5f</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: The selected workflow has errors and cannot be published. Please open the workflow, remove the errors and try again.
at Microsoft.Crm.Dialogs.ActivateDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #58051F99</Message>
<Timestamp>2019-10-14T22:46:07.0716108Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>1029c1e4-3085-4597-ad2d-61d5181fde5f</ActivityId>
<ErrorCode>-2147187627</ErrorCode>
<ErrorDetails xmlns:d3p1="">schemas.datacontract.org/.../System.Collections.Generic" />
<HelpLink i:nil="true" />
<Message>The selected workflow has errors and cannot be published. Please open the workflow, remove the errors and try again.</Message>
<Timestamp>2019-10-14T22:46:07.0716108Z</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 i:nil="true" />
</OrganizationServiceFault>