Dynamics 365 Portals: Create, Edit, Read-Only with Entity Lists & Forms

Dynamics 365 Portals, now known as Power Pages, provide a powerful way for organizations to securely share Dataverse data with external users. A common requirement is to present data in a way that allows for creation, modification, and simple viewing from a single interface. This guide will walk you through configuring Create, Edit, and Read-Only functionality using Entity Lists and Entity Forms within Power Pages.

Prerequisites

Before you begin, ensure you have the following in place:

Business Scenario

Imagine a scenario where users need to interact with a list of requests. They should be able to create new requests, edit their existing requests, and view other records without the ability to make modifications. This can all be achieved from a single, well-configured Entity List.

Professional architecture diagram illustrating Power Pages components.

Implementation Steps

The process involves several key steps, from creating the necessary forms to configuring the entity list and permissions.

Step 1: Create an Entity List

An Entity List displays a list of records from a specified Dataverse table. You'll configure this list to link to the forms you'll create later.

Step 2: Create an Insert Entity Form

This form will be used for creating new records. Configure it with the necessary fields for new entries.

Step 3: Create an Edit Entity Form

This form is for modifying existing records. Ensure it includes all fields that users should be able to update.

Step 4: Create a Read-Only Entity Form

This form is designed purely for viewing records. All fields should be set to a read-only state.

Diagram showing Entity Form configuration in Power Pages.

Step 5: Create Web Pages

You will need to create separate web pages for each of these actions (Create, Edit, View) and associate the corresponding Entity Forms with them. For the Entity List itself, you'll also create a web page.

Step 6: Configure Entity List Actions

Within the Entity List configuration, you will define the actions that users can perform. This includes specifying which forms to use for creating new records, editing existing ones, and viewing details. Crucially, you'll link these actions to the respective forms and web pages created in the previous steps.

Step 7: Configure Entity Permissions

This is a critical step for security. You must configure Entity Permissions to control which web roles have access to create, read, and write operations on your Dataverse table. Ensure that users have the appropriate permissions assigned based on their web role.

Screenshot of Entity Permissions setup in Power Pages.

Step 8: Test Create, Edit and View Operations

Thorough testing is essential. Log in as a user with the relevant web role and test the following:

Common Issues and Solutions

Here are some common challenges you might encounter and how to resolve them:

Issue: Form opens as Read-Only when it should be editable.

Solution: This is often due to incorrect Entity Permissions. Verify that the web role associated with the user has 'Write' permissions enabled for the specific table and the 'Edit' action on the Entity List is correctly configured to use the editable form. Also, double-check the 'Form Mode' setting in the Entity Form configuration.

Issue: Record not found when trying to edit or view.

Solution: This typically points to an issue with how the record identifier is being passed. Check the querystring parameter mapping in your Entity List and Entity Form configurations. Ensure that the correct ID column is being used to link the list item to the form.

Best Practices

To ensure a robust and secure implementation, consider these best practices:

By following these steps and best practices, you can effectively configure Create, Edit, and Read-Only functionality within your Dynamics 365 Portals, providing a seamless and secure experience for your external users.