Upload and manage related files from a model-driven form using a clean, modern UI. This PCF control lets users drag and drop files to a child table via a 1:N relationship, shows upload progress, and allows deletions.
- Drag-and-drop or click-to-upload
- Upload progress indicator
- Sortable/filterable file list
- Delete selected files
- Small bundle size (no heavy icon libraries)
- If you just installed this component then click on "Get more components" and add it to the form.
- Drag and drop the component onto the form.
- In the right hand pane, scroll to the bottom and open up "components". Click on the 3 dots on the side of "modern Subgrid Dropzone"
- The "Table" and "View" fields do nto affect the control. Make sure the controls listed below are configured correctly.
Configure these inputs when adding the control to a form:
- relationshipSchemaName: Schema name of the 1:N relationship from the current table (parent) to the file table (child). Example:
new_document_Case_new_case. - fileFieldLogicalName: Logical name of the File column on the child table. Example:
new_file. - fileSizeFieldLogicalName: Optional logical name of a Text column on the child table that stores file size in bytes. Example:
new_filesize. - fileNameFieldLogicalName: Logical name of the Text column on the child table used as the file name. Example:
new_filename. - maxFiles: Maximum number of files selectable per upload (whole number). Example:
100. - maxUploadSizeMB: Maximum single file size in megabytes (whole number). Example:
128.
Notes:
- The control manifest includes a placeholder dataset named
LeaveEmpty; you do not need to bind it to data. - Ensure your parameter names match the manifest exactly (case-sensitive in code).
- relationshipSchemaName:
new_document_Case_new_case - fileFieldLogicalName:
new_file - fileSizeFieldLogicalName:
new_filesize - fileNameFieldLogicalName:
new_filename - maxFiles:
100 - maxUploadSizeMB:
128
- In the Maker portal, open the solution that contains your parent table.
- Open the parent table, go to Relationships → 1:N.
- Find the relationship pointing to your file table and copy its Schema Name (not the Display Name).
- Node.js 18+ (LTS recommended)
- Power Platform CLI (
pac) - A Dataverse environment where you have rights to import solutions and add controls to forms
# from repository root
npm ci
npm run buildUseful scripts:
npm run start: run the PCF test harnessnpm run rebuild: clean + buildnpm run refreshTypes: regenerate TypeScript types after changing the manifest
Option A — push directly during development
pac auth create --url https://yourorg.crm.dynamics.com
pac pcf pushThis creates/updates a temporary solution in your environment with the control for quick testing.
Option B — import a solution zip
- Build the control:
npm run build. - Build the Visual Studio solution located under
Solution/ModernSubgridDropzoneto produce a zip (e.g.,Solution/ModernSubgridDropzone/bin/Debug/ModernSubgridDropzone.zip). - Import the zip into your environment via Solutions → Import.
- Open the model-driven form where you want the control.
- Insert a section or placeholder and add the control
guk_GorgonUK.ModernSubgridDropzone. - In the control’s properties, set the inputs listed above.
- Save and publish the form and app.
Permissions required for end users:
- Create/Read/Write on the child (file) table
- Append/Append To between the parent and child tables
- It is strongly recommended to set all inputs explicitly. If an input is omitted, the control may attempt to use a code default. Configure
fileFieldLogicalNameandfileNameFieldLogicalNameto avoid ambiguity. - If
fileSizeFieldLogicalNameis provided, the control writes the file size in bytes. - If
maxFilesis not provided or is 0, the default is 100. - If
maxUploadSizeMBis not provided or is 0, the default is 128 MB.
- "Property RelationshipName is required" or "Expected non-empty string": one or more inputs are empty or mismatched. Ensure
relationshipSchemaNameis set and valid. Verify column logical names exist on the child table. - No files appear after upload: verify the relationship connects the child records to the current parent record and that users have security permissions.
- Types don’t match after editing the manifest: run
npm run refreshTypesand re-build.
- React 16.14
- ShadCN-inspired UI components
- React Dropzone for file picking/drag-and-drop
- Dataverse Web API for create/upload/delete operations
If you experience and issue, make sure to open a new Github issue
