Create Related Record function for Dynamics 365 Portals

To enable users to sign up their team for an event I use the "Create related record" function from a read-only entity form for the event on my dynamics 365 portals website.

Entity form "Team - Signup"

So first I create an Read Only entity form that display information about the event. I call the entity form "Team - Signup".
Additional settings
Then in the "Additional settings" I setup the "Create related record" function to create a new team using the "Create Team" insert entity form that I created earlier

Entity Form "Team Create"

Set entity reference on save
To ensure that the right event is related to this new team I also setup the "Set entity reference on save". 

Entity Form metadata
To make sure the users is not prompted for unnessesary information I add Entity Form Metadata to prepopulate the fields that the system already know.

Entity Permissions

Creating a new entity permisson for the event entity that has the "append" and "append to" properties.

Adding a child entity permission for the adding of teams permissions
Adding the parent to the web role of "Authenticated users"
Make sure that you don't have overlapping entity permissions for the same entity. This will remove permissions - not add to them. Keep it clan!


Create a new page called "signup" and set entity form "Team - Signup" to display event information.
OBS! For this page to display the event information you must add the event ID to the url like this:
The portal event information look like this (only displaying the event title for now):

The button is the "Create related record" button
When I hit the button the entity form for creating a new team is displayed in a dialog
Legg igjen en kommentar