web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Answered

Business Rule Trigger

(0) ShareShare
ReportReport
Posted on by 80

Hi experts,

I have a problem regarding a new column of an existing table.

In the Case entity, the Origin column allows to choose between Phone, Email, Portal and Internal.
However, for an evaluation by means of a diagram I would like to distinguish only between internal (contains internal) and external (contains telephone, e-mail and portal).

Therefore I have created a new column called Source. Here there are only the options Internal and External. Now I have created the following business rule of the Case entity:
If Origin equals "Internal"
Then
Set Source to "Internal
Else
Set Source to "External

This also works well when new cases are created. However, this business rule does not apply to old, i.e. existing, cases. The Source column is only updated once I open a case. Then only this case will be updated.

How can I make the data update also for existing cases without having to open all of them? Or how do I trigger the created business rule for all cases?

Thank you very much in advance!

I have the same question (0)
  • Verified answer
    LuHao Profile Picture
    40,892 on at
    RE: Business Rule Trigger

    Hi danielst,

    There are two ways to update existing records.

    1. Run an on-demand workflow on all records in a view.

    Create a personal view that includes all records to be updated.

    Then create an on-demand workflow to update fields value.

    In the XrmToolBox, use Bulk Workflow Execution to run an on-demand for a biew.

    2860.pastedimage1615304462236v1.png

    2. Run a flow to update all records.

    Flow can set the scope of update records internally, so that no matter where the flow is run, it can update specific batch records.

    I will choose instant flow, which means the flow will be trigger manually by myself.

    4405.pastedimage1615304485217v2.png

    Before "update a row" step, we will use 'List rows' step to search for the records, so that the scope of the update records is determined.

    2678.pastedimage1615304494873v3.png

  • danielst Profile Picture
    80 on at
    RE: Business Rule Trigger

    Thank you very much for your quick help!
    That has already helped me a lot.

    I have decided for the second way. It works almost everything (so I think at least) very well.

    Only unfortunately I do not really know how to deal with this action 'apply to each'.

    I implemented my condition in the flow and it runs, I think, correctly that all cases are passed through and at the specific origin also the condition follows the correct path.

    Unfortunately I have some error so the value is not updated correctly though. This is related to my lack of understanding how to update the data in the last part of the flow.

    Hope I can be helped here, here are the screenshots:

    1057.pastedimage1615451382779v1.png

    Is it correct to write 'Actual Element' for 'Row-ID'?

    Sorry that the screenshot is in German.

    Many thanks in advance!

  • Suggested answer
    LuHao Profile Picture
    40,892 on at
    RE: Business Rule Trigger

    Hi danielst,

    'Row-ID' should be 'Case' field.

    pastedimage1615452379965v1.png

    In addition, you can set condition in the "Filter rows" of "List rows" step instead of use "Condition" step.

    pastedimage1615452569626v2.png

    For the usage of "Filter rows", please refer to this blog: https://diyd365.com/2019/11/20/every-power-automate-ms-flow-filter-query-you-ever-wanted-to-know-as-a-functional-consultant/

  • LuHao Profile Picture
    40,892 on at
    RE: Business Rule Trigger

    Hi danielst,

    BTW, it is completely feasible to use "Condition" step, but it is not as efficient as "Filter rows".

  • danielst Profile Picture
    80 on at
    RE: Business Rule Trigger

    Again, thank you very much!

    I understand that, only I also need to update data that does not apply to this filter expression, which means that I really need all values.

    Now I have a slightly different problem, however I would be very grateful if you have an approach for this as well:

    Error: "Since case is resolved and read-only, only these attributes are updatable : \"ownerid\", \"owneridyominame\", \"owneridtype\", \"owninguser\", \"statecode\", \"statuscode\", \"modifiedon\", \"modifiedby\", \"modifiedonbehalfby\", \"owningbusinessunit\" \"processid\". If you need to edit other fields, please reactivate the case.",

    Unfortunately I did not find where to change this option.

  • LuHao Profile Picture
    40,892 on at
    RE: Business Rule Trigger

    Hi danielst,

    It is because Cases whose Status field is Resolved are read-only, their most fields cannot be updated, except the fields in the error.

    You can add a condition in the "Filter rows" or "Condition" step.

    statecode ne 1

    Status does not equal 1

  • danielst Profile Picture
    80 on at
    RE: Business Rule Trigger

    Thank you!

    I understood that, but the problem is that I also want to update cases that are already closed in order to prepare the data for evaluations.

    So is it possible that I set the column 'source' so that it can be edited even after a case is closed?

  • danielst Profile Picture
    80 on at
    RE: Business Rule Trigger

    Thank you!

    I understood that, but the problem is that I also want to update cases that are already closed in order to prepare the data for evaluations.

    So is it possible that I set the column 'source' so that it can be edited even after a case is closed?

    Many thanks in advance!

  • LuHao Profile Picture
    40,892 on at
    RE: Business Rule Trigger

    Hi danielst,

    Unfortunately, this is not possible. flow cannot break the logic of the Case entity to forcibly edit the resolved cases.

    We had to change the Status field of Cases to 0 before updating the fields, then update the other fields, and finally change the Status field to 1 again.

  • danielst Profile Picture
    80 on at
    RE: Business Rule Trigger

    Ok, good hint.

    Thank you very much for all your answers, your help has brought me a lot further!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Siv Sagar Profile Picture

Siv Sagar 83 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 79

#3
Martin Dráb Profile Picture

Martin Dráb 67 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans