ADX\Dynamics Portals – Using sub grids in Entity Form
In this article, lets see how to work with ‘Sub grids’ on ‘Entity Forms’ in Portals.
Lets take a scenario to understand this better, In Dynamics:
- Create a new custom Entity named ‘Employee’
- Create a related entity ‘Child’ to capture children details of ‘Employee’
- Configure a single portal screen, to capture ‘Employee’ and ‘Children’
Below is how the ‘Employee’ entity form with ‘Children’ sub grid, in Dynamics, looks like:
High level design steps:
- Create a new ‘Entity Form’ for ‘Employee’ Dynamics form
- Create a new ‘Entity Form’ (i.e.,Child Create) for ‘Child’ entity to ‘Insert’ (i.e., Mode=Insert) record
- Create a new ‘Entity Form’ (i.e., Child Details) for ‘Child’ entity to ‘Edit’ (i.e., Mode=Edit) record
- On ‘Employee’ entity form, configure ‘Child’ ‘Sub grid’ using ‘Entity Form Metadata’
- Add ‘Create’ and ‘Details’ actions on Sub grid.
Now lets see step by step.
Create new ‘Entity Form’ Employee:
- Create a new ‘Employee Details’ Entity Form pointing to ‘Employee’ entity and ‘Information’ form.
- Now lets see how the ‘Employee’ form looks in the portal.
- If you notice, there is a grid section ‘Children’ available on Portal form, however its unusable, as there are no ‘Create’ or ‘Edit/Details’ options.
Configure ”Entity Form Metadata’:
With ‘Entity Form Metadata’, we can make sub grid usable. We can add actions (i.e.,Create/Edit/Details buttons) and to the sub grid.
- Go to ‘Employee’ form site map and click on ‘Entity Form Metadata’
- Under the ‘Type’ select ‘Subgrid’ and choose your ‘Subgrid Name’
- Next, we need to configure ‘Create’ and ‘Edit’ buttons to the sub grid.
- Under the ‘Grid Configuration’ tab, click on ‘Create’ and fill the ‘Entity Form’ (i.e.,Child Create) details
- To add, Edit/Details action click on ‘Details’ and fill the ‘Entity Form’ details
- Note: Even though, I choose ‘Details’ action, my associated ‘Entity Form’ (i.e.,Child Details) is set form mode ‘Edit’ which can be used to view and edit.
- Save the ‘Entity Form Metadata’.
Test the functionality:
- Login to your portal
- Clear the Portal Cache by navigating to “Portal URL+‘/_services/about’”
- Note: This step is optional and needed only if you don’t find your changes in portal
- Open the ‘Employee’ record and now you should see ‘Child’ grid with ‘Add new child’ button.
- Click ‘Add new child’ button and it will open up ‘Child Create’ entity form.
- Click ‘Submit’ which saves the record.
- Now either click on 1st column or ‘Details’ button to ‘Edit’ the record which opens up ‘Child Details’ Entity form.
- Modify the data, if needed and click ‘Submit’
🙂
Categories: ADX, Dynamics Portals
Tags: ADX, Dynamics Portal, Metadata, sub grid
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Stats
- 1,279,515 hits
Translate
Categories
Top Posts
- Auto generate new GUID for ‘uniqueidentifier’ column in SQL Table
- Power Apps component framework (PCF) - Beginner guide
- Dynamics Portals - Restricting portal access by IP address
- Set “Created On”,” Created By”, “Modified On”, “Modified By” fields using SDK/Data Import/Plug-in – Dynamics 365
- C# - Bulk Update Records - Pass Data Table to SQL Stored Procedure
- Useful JScript syntax's – ADX/Dynamics 365 Portals
- [Step by Step] Postman tool to test Dynamics 365 online Web API
- Power Apps - Component library
- [MS Word] The Linked file isn't available
- [Step by Step] Connecting to Azure SQL Server using OLEDB Connection from SSIS
Recent Posts
- Canvas App | Display and Download large data sets of Images from Azure Blob Container with no delegation issues
- Canvas App Import Failure | CanvasAppEnvironmentMismatch error
- ‘Callback Registration Expander’ System Jobs stuck at ‘Waiting For Resources’
- [Step by Step] Debug Model Driven and Canvas Apps using ‘Monitor’ tool
- Canvas App | Dataverse | Distribute columns to multiple forms and Patch