- First Name
- Last Name
- Question Description
- Attachments
My response was crafted with AI assistance, tailored to provide detailed and actionable guidance for your query.
To create a Power Pages (formerly known as Power Apps Portals) form that allows anonymous users to submit a Case and an associated Contact, you can achieve this using a combination of basic configuration and JavaScript customization.
Since the user is anonymous, you need to allow access for the portal to create Contacts and Cases.
Enable Table Permissions for Cases and Contacts:
Assign Table Permissions to Forms:
Create a basic form in the Power Pages portal to collect the required data.
In Dynamics 365 or Power Apps:
Enable Anonymous Submission:
Create Metadata for Default Case Type:
Since Contact is required for a Case, you’ll need to programmatically create a Contact and associate it with the Case. To do this:
Add JavaScript to Automate Contact Creation:
Steps:
Here’s a sample script for this:
javascript
#firstname
, #lastname
, #email
, etc.) with the actual field IDs or classes from your form.To set default values like Case Type = "Question":
"Question"
Enable File Attachments:
Annotation
table permissions are set for anonymous users.Redirect After Submission:
Error Handling and Validation:
This approach uses a combination of Power Pages OOTB features (for table permissions, entity forms, and metadata) and JavaScript for custom logic to handle the Contact and Case creation.
André Arnaud de Cal... 291,904 Super User 2024 Season 2
Martin Dráb 230,605 Most Valuable Professional
nmaenpaa 101,156