Model-Driven App Components
Earn 25 points (50 with Pro) in two steps
- ① Read through the lesson — each section gets a ✓ as you scroll through it.
- ② When every section has a ✓, tap Complete lesson.
0 of 10 read · keep scrolling
✦ See fewer ads and earn double points — 50 a lesson instead of 25 — with Pro
Module: Extend Customer Service
Section: Data Model and UI Components
Lesson: Model-Driven App Components
Introduction: Understanding the Power of Model-Driven Apps
In the landscape of modern business applications, the ability to build functional, data-centric tools quickly is a primary requirement for organizations looking to optimize their customer service operations. Model-driven apps represent a shift in how we approach software development: instead of focusing on the pixel-perfect design of every screen, we focus on the data model—the tables, relationships, and business logic that define how our application behaves. When we define our data structure correctly, the user interface is generated automatically, allowing us to build complex, enterprise-grade applications with significantly less effort than traditional custom coding.
This lesson explores the core components that make up a model-driven app within the context of extending customer service functionality. Whether you are managing support tickets, tracking customer interactions, or automating service escalations, understanding these components is the difference between a disorganized data store and a cohesive, efficient service platform. By mastering how to structure tables, configure forms, and organize views, you empower your customer service team to access the information they need exactly when they need it, ultimately leading to faster resolution times and higher customer satisfaction.
Not read yet
The Foundation: The Data Model (Dataverse)
At the heart of every model-driven app is the Dataverse. This is not just a database; it is a relational storage system that understands the context of your business data. Before we touch any UI components, we must ensure our schema is sound. A poorly designed data model will lead to a fragmented user experience, regardless of how well you configure your forms or views.
Tables and Columns
Tables are the containers for your data. In a customer service scenario, you might have standard tables like Account or Contact, but you will often need custom tables such as Service Request, Knowledge Base Article, or Feedback Survey. When creating these, you must consider the data types carefully. Using a Choice column is almost always better than a Text column for status fields, as it enforces data integrity and allows for consistent reporting later.
Relationships
Relationships define how your data interacts. In customer service, the most common relationship is a one-to-many relationship, such as one Account having many Service Requests. Configuring these relationships correctly in the data layer ensures that when a user opens an account record, the app automatically knows how to filter the related service requests. This "automatic" behavior is the core value proposition of model-driven apps—you define the relationship once, and the platform handles the UI navigation and filtering for you.
Callout: Dataverse vs. Traditional SQL While Dataverse is built on top of SQL technology, it abstracts away much of the complexity of standard database management. You do not need to write
JOINqueries or manage complex index tuning. Instead, you define relationships through a visual designer, and the platform creates the underlying foreign keys and indexes. This allows you to focus on the business logic rather than the plumbing of the database.
Not read yet
UI Components: Forms and Views
Once the data model is established, we move to the UI components. In a model-driven app, the "Form" is your primary interface for data entry and editing, while the "View" is your primary interface for data discovery and navigation.
Configuring Forms
Forms are how your users interact with individual records. A good form design should follow the logical flow of a service agent’s work. For example, if an agent is handling a ticket, they need to see the customer's contact details, the current issue description, and the resolution notes in a specific order.
- Tabs and Sections: Use tabs to group logically separate information. For instance, put the primary ticket details in a "General" tab and historical interaction logs in an "Activity" tab.
- Column Layout: Avoid creating long, single-column forms that require excessive scrolling. Use two-column or three-column layouts to maximize screen real estate.
- Business Rules: Use business rules to show or hide fields based on user input. For example, if the status of a ticket is set to "Resolved," you might automatically make a "Resolution Code" field mandatory.
Configuring Views
Views are the lists that users see when they navigate to a table. A well-configured view is often more important than a fancy form, as this is where agents spend the majority of their time finding the next task.
- Filter Criteria: Always define default filters. A "My Active Service Requests" view should automatically filter by the logged-in user and exclude records where the status is "Closed."
- Column Selection: Include only the columns necessary for a quick decision. If an agent needs to see the urgency of a ticket, make sure the "Priority" column is visible in the view.
- Sorting: Set a default sort order, such as "Created On" in descending order, so that the most recent tickets always appear at the top of the list.
Not read yet
Step-by-Step: Creating a Custom Service Request Table
Let's walk through the process of building a core component for a service application: the Service Request table.
Step 1: Create the Table
Navigate to your environment's solution, select "New," and choose "Table." Name it Service Request. Ensure you enable auditing and attachments if your business process requires tracking changes or file uploads.
Step 2: Add Essential Columns Add the following columns to define the request:
Title(Text): The summary of the issue.Priority(Choice): Options include Low, Medium, High, and Critical.Status(Choice): Options include New, In Progress, On Hold, and Resolved.Customer(Lookup): A relationship to theAccounttable.
Step 3: Define the Main Form
Open the "Main" form designer. Drag the columns you created into the form. Organize them into two sections: "Primary Information" and "Tracking Details." Add a "Business Rule" that sets the Status to "New" whenever a new record is created.
Step 4: Configure the Default View
Open the "Active Service Requests" view. Add the columns Title, Customer, Priority, and Status. Set the filter criteria to Status does not equal Resolved. Save and publish your changes.
Note: Always remember to publish your changes after modifying tables, forms, or views. A common mistake is assuming that saving in the designer automatically makes the changes visible to users. While the changes are saved to the solution, they are not "live" until they are published.
Not read yet
Business Logic and Automation
While the UI and data model handle structure, business logic handles the "behavior" of your application. In model-driven apps, we primarily use Business Rules, Power Automate, and occasionally Client-Side JavaScript.
Business Rules
Business rules are the most efficient way to add logic without writing code. They allow you to:
- Set field values (e.g., setting a default date).
- Clear field values.
- Validate data (e.g., ensuring a "Resolution Date" is not in the past).
- Show error messages.
When to use JavaScript
Sometimes, you need more control than Business Rules offer. For example, if you need to call an external API to verify a customer's subscription status when a form loads, you will need to write JavaScript.
// Example: Validating a field on save
function validateResolutionCode(executionContext) {
var formContext = executionContext.getFormContext();
var status = formContext.getAttribute("statuscode").getValue();
var resolutionCode = formContext.getAttribute("resolutioncode").getValue();
if (status === 100000001 && resolutionCode === null) {
alert("Please enter a resolution code before closing the ticket.");
executionContext.getEventArgs().preventDefault();
}
}
Explanation of the code: The executionContext provides access to the form's data. We retrieve the values of the statuscode and resolutioncode fields. If the status indicates the ticket is being closed but the resolution code is empty, we prevent the save operation and alert the user. This keeps your data clean and enforces your service level agreements (SLAs).
Not read yet
Best Practices for Model-Driven Apps
Building an app is easy; building an app that stays maintainable for years requires discipline. Follow these industry standards to ensure your application remains performant and easy to update.
- Use Solutions for Everything: Never make changes in the "Default" solution. Always create a dedicated solution for your project. This ensures that your changes are portable and can be moved between development, test, and production environments.
- Naming Conventions: Develop a naming convention for your columns and tables (e.g., prefixing custom columns with your company initials like
abc_). This prevents naming collisions and makes it clear which fields belong to your custom logic versus the system defaults. - Performance Optimization: Avoid putting too many fields on a single form. Every field added to a form increases the load time. If you have 50+ fields, consider using "Quick View" forms or multiple tabs to load data only when necessary.
- Keep Business Logic Simple: If a process requires more than five or six steps in a business rule, consider using a Power Automate flow instead. Complex business rules are difficult to debug and maintain.
- User Experience Focus: Even though the UI is "generated," you still have control. Use "Form Headers" to surface the most important information, such as the ticket ID or status, so it is always visible regardless of which tab the user is on.
Not read yet
Common Pitfalls and How to Avoid Them
Even experienced developers fall into common traps. Being aware of these will save you hours of troubleshooting.
- The "Over-Customization" Trap: A common mistake is trying to force the UI to look exactly like a legacy system. Model-driven apps have a specific "look and feel." Trying to override this with heavy CSS or complex scripts usually leads to a fragile application that breaks after every platform update. Embrace the standard UI.
- Ignoring Security Roles: Developers often test as an Administrator, which has access to everything. Always test your app using a user account with the specific security role assigned to your service agents. You might find that your agents cannot see the "Related" records because the security role doesn't grant read access to the linked table.
- Hardcoding Values: Avoid hardcoding GUIDs or specific values in your scripts. If you need to reference a specific "Status" value, use an Option Set value or a configuration table. If you hardcode a value, the script will break if the environment is moved to a new system where that specific record ID doesn't exist.
- Forgetting Mobile Users: Model-driven apps work on mobile devices automatically. However, if you have a massive form with 10 sections, it will be unusable on a phone. Design your forms with mobile in mind by keeping the most critical fields at the top of the first tab.
Not read yet
Comparison: When to use which Component
Choosing the right tool for the job is essential for efficiency. Use the table below as a quick reference guide.
| Feature | Business Rule | Power Automate | Client-Side JavaScript |
|---|---|---|---|
| Best For | Simple UI logic/Validation | Long-running background processes | Complex, real-time UI interactions |
| Execution | Real-time on the form | Asynchronous/Background | Real-time on the form |
| Complexity | Low | Medium | High |
| Maintenance | Easy | Moderate | Difficult |
Callout: The Power of Configuration over Code Always prioritize the "No-Code" approach. If you can achieve a requirement using a Business Rule, do not write JavaScript. If you can achieve it with a Power Automate flow, do not write a custom plugin. The more you rely on standard platform capabilities, the easier it will be to upgrade your system when new features are released.
Advanced Considerations: Extending Service Functionality
To truly extend customer service, you must look beyond individual tables. Consider how "Business Process Flows" (BPFs) can guide your agents through a standard resolution process.
Implementing Business Process Flows
A BPF provides a visual guide at the top of the form, showing the stages of a process (e.g., "Identify Issue," "Troubleshoot," "Resolve," "Close"). This ensures that every agent follows the same steps, regardless of their experience level.
- Define Stages: Map out your service process. For example, "Initial Contact," "Escalation," and "Resolution."
- Add Steps: Within each stage, add the fields that must be completed before moving to the next stage.
- Enforce Logic: You can set the BPF to be mandatory, meaning an agent cannot "Resolve" a ticket without filling in the "Resolution Notes" field.
This provides a consistent, repeatable process for your team, which is the cornerstone of professional customer service.
Not read yet
Frequently Asked Questions (FAQ)
Q: Can I change the look and feel of a model-driven app? A: You can customize the theme (colors and logo) to match your corporate branding. However, you cannot significantly change the layout or structure of the components beyond what the designers allow. This is intentional to ensure consistency and performance.
Q: How do I handle data that needs to be imported from an external system? A: You can use "Dataflows" to bring data into Dataverse. This allows you to schedule regular imports from Excel, SQL, or other cloud services. Do not try to write custom code to import data unless you have very specific, real-time requirements.
Q: Is it possible to have different forms for different users? A: Yes. You can create multiple forms for a single table and assign them to specific Security Roles. For example, a "Manager" might see a form with "Approval" fields, while an "Agent" sees a simplified version of the same record.
Q: What happens if I make a mistake in my data model? A: You can modify columns and tables after they are created, but be careful with deleting columns that contain data. Always back up your data or test changes in a "Sandbox" environment before applying them to your production environment.
Not read yet
Summary and Key Takeaways
Mastering model-driven app components is a journey of understanding how data, forms, views, and business logic work in harmony. By focusing on the underlying data model first, you create a stable foundation that supports all subsequent UI and process configurations.
Key Takeaways:
- Prioritize the Data Model: A well-structured Dataverse schema is the most important factor in a successful app. Use appropriate data types and define clear relationships.
- Design for the User: Configure forms and views based on the actual workflow of your service agents. Keep the most important information front and center, and use tabs to organize secondary data.
- Favor Configuration over Code: Use native tools like Business Rules and Business Process Flows whenever possible. Only reach for JavaScript or custom plugins when native capabilities are insufficient.
- Maintain Clean Environments: Always work within dedicated solutions and follow consistent naming conventions. This ensures your app is maintainable, scalable, and easy to update.
- Test with Reality in Mind: Never rely solely on Administrator testing. Test your configurations using the specific security roles that your users will have to ensure that your permissions and visibility settings are correct.
- Embrace the Platform Standards: Avoid the temptation to over-customize the UI. The standard, predictable interface of a model-driven app is one of its greatest strengths, as it reduces training time for new users.
- Focus on Process: Use Business Process Flows to standardize your service operations. This provides guidance to your team and ensures that every customer interaction follows your company's quality standards.
By applying these principles, you will be able to build robust, efficient, and user-friendly applications that significantly enhance your organization's customer service capabilities. Remember that the goal is not just to build an app, but to build a tool that makes your agents' lives easier and your customers' experiences better. As you continue to work with these components, keep looking for ways to simplify your processes and leverage the platform's built-in intelligence.
Not read yet
Each section gets a ✓ as you scroll through it. Tap the button to jump to the next one.
- Record Creation and Update Rules
- Record Creation and Update Rules Quiz5q
- Case Resolution Configuration
- Case Resolution Configuration Quiz5q
- Security Roles in Customer Service
- Security Roles in Customer Service Quiz5q
- Timeline Control Configuration
- Timeline Control Configuration Quiz5q
- Card Forms and Highlights
- Card Forms and Highlights Quiz5q
- Internal Knowledge Search Configuration
- Internal Knowledge Search Configuration Quiz5q
- Knowledge Management Tables Configuration
- Knowledge Management Tables Configuration Quiz5q
- Translated Knowledge Articles
- Translated Knowledge Articles Quiz5q
- External Knowledge Sources Integration
- External Knowledge Sources Integration Quiz5q
- AI Suggestions and Copilot Knowledge Creation
- AI Suggestions and Copilot Knowledge Creation Quiz5q
- Ask a Question Configuration
- Ask a Question Configuration Quiz5q
- Case Timeline and Conversation Summaries
- Case Timeline and Conversation Summaries Quiz5q
- Draft a Response Configuration
- Draft a Response Configuration Quiz5q
- Case Management Agent Configuration
- Case Management Agent Configuration Quiz5q
- Agent Plugins and Knowledge Sources
- Agent Plugins and Knowledge Sources Quiz5q
- Case Hierarchies and Parent Cases
- Case Hierarchies and Parent Cases Quiz5q
- Case Merging and Similar Cases
- Case Merging and Similar Cases Quiz5q
- Case Routing Rules
- Case Routing Rules Quiz5q
- Automatic Case Creation
- Automatic Case Creation Quiz5q
- Email to Case Conversion
- Email to Case Conversion Quiz5q
- Case Subjects and Categories
- Case Subjects and Categories Quiz5q
- Workstream Configuration
- Workstream Configuration Quiz5q
- User Settings for Routing
- User Settings for Routing Quiz5q
- Capacity Profiles Management
- Capacity Profiles Management Quiz5q
- Work Classification and Assignment Rules
- Work Classification and Assignment Rules Quiz5q
- Basic Routing Rulesets
- Basic Routing Rulesets Quiz5q
- Skills-Based Routing and Skill Finder Models
- Skills-Based Routing and Skill Finder Models Quiz5q
- Queue Configuration
- Queue Configuration Quiz5q
- Routing for Records
- Routing for Records Quiz5q
- Chat Channel Configuration
- Chat Channel Configuration Quiz5q
- Voice Channel Configuration
- Voice Channel Configuration Quiz5q
- SMS Channel Configuration
- SMS Channel Configuration Quiz5q
- Social Channel Integration
- Social Channel Integration Quiz5q
- Email Channel for Omnichannel
- Email Channel for Omnichannel Quiz5q
- Creating and Configuring Forms
- Creating and Configuring Forms Quiz5q
- Creating and Configuring Views
- Creating and Configuring Views Quiz5q
- Model-Driven App Components
- Model-Driven App Components Quiz5q
- Creating and Configuring Columns
- Creating and Configuring Columns Quiz5q
- Alerts and In-App Notifications
- Alerts and In-App Notifications Quiz5q
- Creating and Modifying Tables
- Creating and Modifying Tables Quiz5q
- Configuring Relationships
- Configuring Relationships Quiz5q
- Dataverse Search Configuration
- Dataverse Search Configuration Quiz5q
- Email Templates Creation
- Email Templates Creation Quiz5q
- Triggering Survey Distribution
- Triggering Survey Distribution Quiz5q
- Personalizing Surveys
- Personalizing Surveys Quiz5q
- Survey Results with Cases and Conversations
- Survey Results with Cases and Conversations Quiz5q
- Analyzing Survey Responses
- Analyzing Survey Responses Quiz5q
- CSAT Score Calculations
- CSAT Score Calculations Quiz5q
- Customer Service Historical Analytics
- Customer Service Historical Analytics Quiz5q
- Omnichannel Analytics Dashboard
- Omnichannel Analytics Dashboard Quiz5q
- Real-Time Analytics Configuration
- Real-Time Analytics Configuration Quiz5q
- Knowledge Analytics Configuration
- Knowledge Analytics Configuration Quiz5q
- Power BI Reporting Integration
- Power BI Reporting Integration Quiz5q
- AI Insights for Customer Service
- AI Insights for Customer Service Quiz5q
Spend your points to unlock exam-style practice questions
Spend points to unlock MB-230 exam-style practice questions.
Practice for MB-230