Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Imported Business Rules Not Functioning

Posted on by 180

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 ***

  1. I put the BR into a solution, export the solution, and import the solution into our test environment with no issues.
  2. 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).
  3. After checking the BR in the Default Solution, it appears there and is activated
  4. I deactivate the BR and then when trying to reactive it, receive a 'Error in Process Definition' error
  5. 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.

  1. The BR is packaged up into a solution, exported from Dev and imported into Test.
  2. When I go to the form to test out the new BR, the recommendations are not appearing as expected (not appearing at all).
  3. After checking the BR in the Default Solution, it appears there and is activated
  4. I deactivate the BR and then when trying to reactive it, receive a 'Error in Process Definition' error
  5. 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.
  6. Other steps taken to resolve the issue:
    1. Checked that the dependant field are present on the form
    2. 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. ---&gt; 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&amp; 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>

  • CamParker Profile Picture
    CamParker 180 on at
    RE: Imported Business Rules Not Functioning

    I thought that I had (I went through it twice) but must have been missing something considering that the migration tool process fixed the issue.

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Imported Business Rules Not Functioning

    Excellent thanks for confirming :)

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Imported Business Rules Not Functioning

    I would say that the two issues are related. So just to confirm, you checked and refreshed all the lookups referenced in all conditionn and actions?

  • CamParker Profile Picture
    CamParker 180 on at
    RE: Imported Business Rules Not Functioning

    Solved!

    1) I removed the 'metadata' from Field A

    2) imported the solution containing all the BRs

    3) Imported the metadata using the Configuration Migration Tool

    4) Everything worked without needing to do anything more to the BRs!

    Thanks for your suggestion and help Omar!

  • CamParker Profile Picture
    CamParker 180 on at
    RE: Imported Business Rules Not Functioning

    Hi Omar,

    Thanks for that info in relation to the lookup reference issue - I'll definitely check out the data migration tool.

    When validating, it simply says 'Validation successful' and there is no indication that anything is wrong until I attempt to activate it.

    pastedimage1571097555497v1.png

  • Verified answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Imported Business Rules Not Functioning

    Hi,

    For the first case you seem like you have a mismatch in you data Id's. Those lookups you are referring to must be the same in dev/tes/prod environments. By the same, I mean the same ID. this is achieved by creating them in dev and use the data migration tool to move them to the other environments. Be careful here because the data migration tool (depending on your setting) may create new ID's ( you don't want that) or you can configure it to keep the same IDs (you want that). This post tells you how to do it

    community.dynamics.com/.../using-the-configuration-data-migration-tool-with-non-unique-display-name-values

    Now for the second case, what happens when you click on validate the BR? What warning errors show up on top?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans