Auto-assigning records when a form is submitted in Power Pages (formerly Power Apps Portals) helps streamline workflows by directing new data entries to specific users or teams based on pre-defined logic. This is commonly used in scenarios like support ticketing, lead management, or case intake.
Ways to Auto-Assign Records
1. Using Power Automate
You can trigger a Power Automate flow when a Dataverse form is submitted to:
- Identify assignment criteria (e.g., region, category, workload).
- Use
Update a Row
action to assign the record to a user/team. - Optional: send notifications (e.g., via Teams or Email).
Trigger: When a row is added in Dataverse
Actions:
- Get user/team details.
- Update the
Owner
field on the record.
2. Using Business Rules
For simple conditions, you can set a default owner using Business Rules on the form.
Limitations:
- Not very flexible with dynamic user logic.
- Best for static assignments (e.g., always assign to User X).
3. JavaScript (Advanced)
You can write JS on the Entity Form to inject logic before submit:
- Get logged-in user or custom field values.
- Use Web API call to assign the record (requires authentication and Web Roles with proper privileges).
4. Server-Side Plugin (Dataverse Plugin)
For complex logic:
- Write a Dataverse plugin on
Create
message. - Auto-assign based on rules (e.g., round-robin, least busy agent).
Example Use Case: Support Ticket Assignment
- User submits a support request via portal form.
- Power Automate checks issue type and user’s region.
- Flow assigns the ticket to the corresponding regional support team automatically.
- Email notification is sent to the assigned team.