Skip to main content

Notifications

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!

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

    Hi danielst,

    If my answer is helpful, please click Yes under "Did this answer your question?". Thanks.

  • 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!

  • LuHao Profile Picture
    40,884 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

    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!

  • 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?

  • LuHao Profile Picture
    40,884 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

    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,884 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".

  • Suggested answer
    LuHao Profile Picture
    40,884 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/

  • 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!

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,099 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,866 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans