Topics

Knowledge Creation Laboratory by CRM(xRM)

D365 Customization Barriers and Breakthroughs: ohya's Practical Notes [#008] ~ Input Control with No-Code! The Charms and Pitfalls of Business Rules ~

Hello, this is ohya.

This time, as the second installment in our automation feature series, we will be looking at "Business Rules."
This is a feature that is often discussed both while studying for the PL-200 and in practice, as it is the boundary between what you can do with it and what you cannot do with it.

🛠 This time's wall

"I want to control input conditions in a form, but writing JavaScript is a bit..."

In practice, it is common

  • - I want to switch required fields depending on the conditions
  • ・I want to automatically enter options
  • ・I want to prevent input errors on the spot

In the past, customization using JavaScript was the standard method for situations like this.
However, the problem is that it is difficult to write the code and requires a lot of maintenance effort.

This is where "business rules" come in, allowing you to control forms without coding.

    1. What are business rules?

    Business rules areForm (client-side) driven conditional processingThis is a function that allows you to create the above without coding.
    When a user opens a form or changes a value, fields can be automatically displayed, made mandatory, and their values ​​set.

    Features

    • ・No-code setup possible (created from the Power Apps screen)
    • - Can be run on both the form and the server(option)
    • ・Improved user experience due to immediate updates
    • ・External system integration and complex processing are not possible

     

    1. 2. Main Actions

    • - Show/hide fields
    • ・Making fields mandatory/optional
    • - Setting field values(Fixed values ​​and values ​​of other fields)
    • - Displaying error messages
    • - Lock/unlock fields

    💡 PL-200Key Points
    The exam often asks, "Can this requirement be achieved with business rules?" Calling external APIs or sending emails is not allowed.

    1. 3. Scope in Business Rules

    The scope here isWorkflow ScopeIt has a different meaning.
    A rough comparison of the differences

  1. Business rule scope types
    1. Entity Scope
      • Server-side executionApplies to all updates including
      • - It also works for updates from sources other than forms (API, import, etc.)
    2. Form-specific scope
      • - Works only in the specified form
      • - It does not work on the server side, it only applies when the user operates it.

     

    1. 4. Practical examples

    Example 1: Conditional Mandatory

    • ·conditions: Negotiation status = "Closed"
    • ·action: Set the Closing Date field to required

    Example 2: Input assistance

    • ·conditions: Prefecture = "Osaka Prefecture"
    • ·action: Automatically set "Osaka Branch" in the Sales Office field

     

    1. 5. Running on the server side

    Business rules areServer-side executionWhen enabled, it also applies when records are updated via API or import.
    However, there are limitations in terms of complex logic and performance.

     

    1. 6.Differences from Workflow

    1. 7. Pitfalls

    • When multiple business rules conflict, the last rule evaluated takes precedence.
    • When executed on the server side, changes in appearance on the form are not visible in real time.
    • - A large number of conditional branches can cause performance degradation

     

    1. 8. Summary

    • ・Business rules are a convenient feature that allows for highly immediate input control without coding.
    • ・Scope determines the execution range (form or entity)
    • ・It cannot be used for external integration or complex processing, so it is best to use Workflow or Cloudflow depending on your purpose.
    • ・The distinction between "what you can do" and "what you can't do" is important in the PL-200 exam

     

    (I.e. Next notice

    Next time we will cover "Business Process Flow".
    We will visualize the workflow and create a system that allows anyone to follow the same steps!

     

Person who wrote this article
ohya

Nice to meet you! I'm a newbie who jumped into the IT industry in March 2025 and am still learning. I started with no experience in programming or IT, but I'm working hard every day, valuing the motto of "study every day, grow every day, and be grateful every day." There's a lot I don't understand, but that's also why I enjoy learning so much! I'm aiming to move forward little by little and become an engineer who can be useful to others. I look forward to working with you!

Articles in the same category