Skip to main content

Notifications

Announcements

No record found.

Customer experience | Sales, Customer Insights,...
Answered

When Creating a Business Rule on Case getting error

Posted on by 299

Hi everyone,

I Created a Business rule on case, that when the customer is empty then fill it with a specific contact.

I got no validation error but when I active it I get this below error.

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: 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: #622D1CF4Detail:
<OrganizationServiceFault xmlns:i="">www.w3.org/.../XMLSchema-instance" xmlns="">schemas.microsoft.com/.../Contracts">
<ActivityId>520f8a98-078c-43ef-a646-82323a0f0ce5</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d2p1:key>CallStack</d2p1:key>
<d2p1:value xmlns:d4p1="">www.w3.org/.../XMLSchema" i:type="d4p1:string"> 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)</d2p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<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: #622D1CF4</Message>
<Timestamp>2022-01-05T10:30:50.7818127Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>520f8a98-078c-43ef-a646-82323a0f0ce5</ActivityId>
<ErrorCode>-2147187627</ErrorCode>
<ErrorDetails xmlns:d3p1="">schemas.datacontract.org/.../System.Collections.Generic">
<KeyValuePairOfstringanyType>
<d3p1:key>CallStack</d3p1:key>
<d3p1:value xmlns:d5p1="">www.w3.org/.../XMLSchema" i:type="d5p1:string"> 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)</d3p1:value>
</KeyValuePairOfstringanyType>
</ErrorDetails>
<Message>The selected workflow has errors and cannot be published. Please open the workflow, remove the errors and try again.</Message>
<Timestamp>2022-01-05T10:30:50.7818127Z</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>

I would appreciate your help.

I'm using Dynamics 9.0.24.8 on-premises, And I'm doing this on a custom entity.

Regards 

Zeinab

  • Verified answer
    Mohsin Ali Profile Picture
    Mohsin Ali 3,610 on at
    RE: When Creating a Business Rule on Case getting error

    Customer field is system required and Business rules run at onsave event instead of onload. So that is the reason you can't set its default value of customer using Business Rule.

    Only supported way is to use JavaScript to set default customer to it.

  • Suggested answer
    Manoj Mane Profile Picture
    Manoj Mane 1,012 on at
    RE: When Creating a Business Rule on Case getting error

    Can You check that there is any Business required field are there ? Try them to make optional.

    And try to Activate your BR.

  • z.sam Profile Picture
    z.sam 299 on at
    RE: When Creating a Business Rule on Case getting error

    Thank You Manoj Mane ,

    6013.bUSINESS-rULE.png

    I have lots of workflows on case I deactivated all, but still have the error.

    [View:/cfs-file/__key/communityserver-discussions-components-files/117/ErrorDetailscase.txt]

  • Manoj Mane Profile Picture
    Manoj Mane 1,012 on at
    RE: When Creating a Business Rule on Case getting error

    Hi,

    Can you share screenshot of your Business Rule ?

    So we can guide you at where the Business Rule is failing.

    Thanks,

    Manoj

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

Featured topics

Product updates

Dynamics 365 release plans