Configuring App Navigation
Complete the full lesson to earn 25 points
Work through each section, then tap “Mark as Complete” on the last one.
✦ Skip the page breaks and see fewer ads — read each lesson on a single page with Pro
Mastering Navigation in Microsoft Power Platform: Model-Driven App Configuration
Introduction: The Architecture of User Experience
When you build a model-driven app in the Microsoft Power Platform, you are essentially creating a data-centric interface that relies on a pre-defined schema. Unlike canvas apps, where you have total control over every pixel, model-driven apps follow a specific structure dictated by your Dataverse tables, forms, and views. Because the framework is so rigid, the way you configure navigation becomes the primary lever you have to improve user efficiency and system adoption.
Navigation is not merely about placing buttons on a screen; it is about defining the mental model your users will adopt when interacting with your business processes. If your navigation is cluttered, users will struggle to find critical records, leading to frustration and data entry errors. If your navigation is logical and role-based, users can move through their daily tasks with minimal cognitive load. This lesson focuses on the mechanics of the Site Map, the nuances of the App Designer, and the strategic decisions you must make to build an intuitive application interface.
Understanding the Site Map Designer
The Site Map is the backbone of your model-driven app. It defines the hierarchical menu structure that appears on the left side of the screen. In modern model-driven apps, this is represented by the navigation bar or the collapsible sidebar. The structure is built using three primary components: Areas, Groups, and Subareas.
The Hierarchy Explained
- Areas: These are the top-level containers. In many standard apps, you might see areas like "Sales," "Service," or "Settings." An area acts as a primary category for your app’s functionality.
- Groups: Within an area, you create groups to organize related entities. For example, if you have a "Sales" area, you might have groups named "Customers," "Sales Pipeline," and "Reports."
- Subareas: These are the actual links that trigger an action. A subarea can point to a Dashboard, a specific Dataverse table (Entity), a URL, or a custom Web Resource.
Callout: The Power of Contextual Navigation While it is tempting to dump every table into the site map, doing so creates an overwhelming interface. A well-configured app uses the Site Map to highlight the most frequently used paths, while hiding administrative or rarely used tables behind a "Settings" or "Admin" area. Think of the Site Map as a map of a building: you want the main entrances and hallways to be clear, while the utility closets should be tucked away.
Step-by-Step: Configuring the Site Map
To configure your navigation, you must work within the App Designer. Follow these steps to set up a clean, professional navigation structure.
- Open the App Designer: Navigate to your solution in the Power Apps maker portal, select your model-driven app, and click "Edit" to open the App Designer.
- Access the Navigation Editor: Click the "Navigation" icon on the left-hand sidebar. This will open the drag-and-drop editor.
- Define Areas: If you are starting from scratch, click "Add" and select "Group" or "Area." If you already have areas, look at the existing structure. You can rename these by clicking the pencil icon next to the area name.
- Add Groups and Subareas: Within your chosen area, add a group. Then, add a subarea to that group. When you add a subarea, a properties pane will appear on the right.
- Configure Subarea Properties:
- Type: Choose between "Dashboard," "Entity," "Web Resource," or "URL."
- Default: Specify if this should be the landing page for the app.
- Title/Icon: Give your subarea a clear, descriptive name and select a relevant icon from the library.
- Save and Publish: Always remember that changes to the Site Map are not visible to end-users until you hit the "Publish" button in the App Designer.
Tip: Use Descriptive Naming Conventions Avoid naming subareas after technical table names (e.g., "cr5f2_client_projects"). Instead, use user-friendly terms like "Active Projects" or "Client Overview." This reduces the learning curve for new users significantly.
Advanced Navigation Techniques
Sometimes, the standard list of entities is not enough. You may need to direct users to specific external resources or custom UI elements.
Linking to External URLs
If your company uses a separate portal for time tracking or documentation, you can add a subarea of type "URL." This allows users to jump out of the model-driven app to another web resource without needing to open a new browser tab manually.
Integrating Web Resources
If you have custom HTML or JavaScript components, you can embed them directly into the navigation. This is particularly useful for custom dashboards or specialized tools that fall outside the standard form/view paradigm.
Customizing the Navigation Bar
Beyond the Site Map, you can control the "Global Navigation" settings. In the App Settings, you can choose whether to display the "Recent" and "Pinned" items. These features are excellent for power users who frequently jump between specific records.
Warning: Complexity Creep It is common for stakeholders to request "everything" to be available in the main navigation. Resist this. Every item you add to the top-level navigation reduces the visibility of the others. If a user needs an item once a month, it should not be in the primary navigation area.
Code-Based Navigation: Client-Side Scripting
While the Site Map is declarative, there are times when you need to control navigation programmatically using JavaScript. This is often required when you want to redirect a user after a form save or based on a specific logic condition.
The Xrm.Navigation namespace is your primary tool here. Below is an example of how to open a specific record or a custom dialog.
// Example: Navigate to a specific record
var entityFormOptions = {};
entityFormOptions["entityName"] = "account";
entityFormOptions["entityId"] = "00000000-0000-0000-0000-000000000000";
Xrm.Navigation.openForm(entityFormOptions).then(
function (success) {
console.log("Record opened successfully.");
},
function (error) {
console.log("Error opening record: " + error.message);
}
);
Explanation of the Code
entityFormOptions: This object defines the target entity and the specific record ID.Xrm.Navigation.openForm: This is the standard method for opening a form. It returns a promise, allowing you to handle success or failure scenarios gracefully.- Error Handling: Always include a failure callback to ensure your application doesn't simply freeze if the record cannot be found or if the user lacks permissions.
Best Practices for App Navigation
Designing navigation is a balancing act between accessibility and clutter. Follow these industry standards to maintain a performant and usable application.
1. Organize by Persona
If your app serves multiple roles (e.g., Sales Reps and Sales Managers), consider creating separate apps for each role. You can use the "App" level to filter which entities are visible. A Sales Rep does not need to see the "Commission Settings" group, so keep that in a separate app or hidden behind security roles.
2. Leverage Security Roles
You can restrict access to specific subareas based on security roles. Even if a subarea is in the Site Map, a user will not see it if they lack the required security permissions for the underlying entity. This is the most secure way to handle navigation visibility.
3. Keep the Depth Shallow
Try to keep your navigation depth to a maximum of two levels (Area -> Group -> Subarea). If you find yourself needing a "Group within a Group," your app is likely too complex and should be split into multiple apps or modules.
4. Use Clear Icons
Icons provide visual cues that help users identify sections at a glance. Use the standard icon library provided by Microsoft to maintain a consistent look and feel with the rest of the Power Platform environment.
5. Test with Real Users
Navigation that makes sense to a developer often makes zero sense to an end-user. Perform "navigation walkthroughs" where you ask a user to find a specific record. If they click more than three times to get there, your navigation structure needs optimization.
Common Pitfalls and How to Avoid Them
Pitfall 1: Over-populating the Navigation Bar
- The Problem: Adding every possible table to the menu makes it impossible to scan.
- The Fix: Use the "Recent" and "Pinned" features to help users find their own data. Hide administrative tables in a dedicated "Settings" area.
Pitfall 2: Ignoring Mobile Experience
- The Problem: Navigation that looks fine on a wide desktop monitor might be unusable on a tablet or phone.
- The Fix: Test your app using the Power Apps mobile app. The navigation structure will adapt, but you need to ensure the most critical items are at the top of the list.
Pitfall 3: Broken Links
- The Problem: Adding external URLs that change or require complex authentication.
- The Fix: Use relative paths where possible and verify that your users have the necessary permissions to access the external resources you are linking to.
Pitfall 4: Hardcoding IDs
- The Problem: Hardcoding record IDs into navigation or JavaScript.
- The Fix: Use environment variables or configuration tables to store dynamic values. If you move your app from a Development environment to a Production environment, hardcoded IDs will break immediately.
Callout: The "One-Click" Rule In high-traffic apps, the most critical data should never be more than one click away. If your users have to navigate through an Area, then a Group, then a Subarea, then a Filtered View just to start their daily work, you are wasting their time. Use Dashboards as the default landing page to surface that information immediately.
Quick Reference Table: Navigation Options
| Feature | Best Use Case | Implementation Method |
|---|---|---|
| Area/Group/Subarea | Standard structural navigation | Site Map Designer |
| Dashboards | Initial landing page for users | Site Map (Subarea -> Dashboard) |
| Web Resources | Custom UI or external app integration | Site Map (Subarea -> Web Resource) |
| External URLs | Linking to documentation or portals | Site Map (Subarea -> URL) |
| Programmatic Nav | Dynamic redirects based on logic | Xrm.Navigation JS API |
Managing Navigation in Larger Solutions
When working in a team environment, managing the Site Map can lead to "solution bloat" or merge conflicts if multiple people edit the same XML. Always use the modern App Designer rather than manually editing the sitemap.xml file. The modern designer provides validation checks that prevent you from breaking the navigation structure.
If you are using ALM (Application Lifecycle Management) practices, remember that the Site Map is part of the Model-Driven App component. When you deploy a solution update, the Site Map will be updated to reflect the version in the source environment. Always perform a "Solution Check" before importing into production to ensure there are no missing dependencies.
Security and Navigation: A Critical Intersection
Navigation is not security. Hiding a link in the Site Map does not prevent a user from accessing a record if they know the URL or if they have permission to see the table elsewhere. Always ensure that your security roles are configured correctly at the table level.
The Site Map simply provides the path. If a user does not have read permissions for the "Account" table, the "Accounts" subarea will simply disappear from their view automatically. This is a powerful feature of the platform: the UI adjusts based on the user's permissions, ensuring that you don't have to build custom navigation for every single user role.
Designing for Growth: The Future-Proof App
As your business grows, your app will likely grow with it. When you first build an app, you might only have three tables. Two years later, you might have thirty. If you have designed your Site Map with clear, logical groups, adding new tables is a matter of placing them in the correct category. If your original navigation was a flat, unordered list, adding more tables will eventually cause the app to become unusable.
Consider the "Modular" approach. Instead of one massive app, consider breaking your business processes into smaller, focused apps. A "Finance" app, a "Sales" app, and a "HR" app are often better than one "All-In-One" app that confuses users. Each app can have its own optimized Site Map, specific to the needs of those departments.
Troubleshooting Navigation Issues
If you find that a subarea is not appearing:
- Check Security Roles: Does the user have read access to the underlying entity?
- Check Site Map Publishing: Did you publish the app after making changes in the designer?
- Check App Module Settings: Is the entity actually added to the App Module? Just adding it to the site map is not enough; the entity must be part of the app's "Data" components.
- Clear Browser Cache: Sometimes the browser caches the old site map structure. Try a hard refresh (Ctrl+F5) or open the app in an Incognito window.
Key Takeaways
- Hierarchy Matters: Use the Area -> Group -> Subarea structure to create a logical mental model for your users.
- Simplify the UI: The best navigation is the one that stays out of the user's way. Use the Site Map to highlight core tasks and hide administrative tasks.
- Security-First: Remember that navigation is for accessibility, not security. Always enforce access through Dataverse security roles.
- Leverage Modern Tools: Use the App Designer GUI instead of manually editing XML to avoid configuration errors and simplify maintenance.
- User-Centric Testing: Navigation should be validated by the people who use the app daily. If they are struggling to find a feature, your map is broken.
- Plan for Scalability: Group related entities logically so that as your app grows, the navigation remains clean and organized.
- Use the
XrmAPI Wisely: When custom code is required for navigation, use theXrm.Navigationnamespace for a supported, stable, and predictable user experience.
By mastering these configuration techniques, you move from simply "building an app" to "designing an experience." A well-thought-out navigation structure is the hallmark of a professional implementation and is often the difference between an app that is embraced by the organization and one that is ignored. Take the time to map out your user journeys before you start dragging and dropping components in the designer, and your users will thank you for the clarity and efficiency you provide.
Enjoying the courses?
Everything stays free. Pro shows fewer ads, doubles your daily points limit so you progress twice as fast, and lets you read each lesson on one page.
- ✓ Fewer advertisements
- ✓ 2× daily points limit
- ✓ Distraction-free lessons