Skip to content

BenLBartle/PCF-AttachmentsGrid

Repository files navigation

PCF - Attachments Grid

A custom PCF control developed by Josh Hetherington and Ben Bartle using the PowerApps Component Framework. This is designed to offer a better UX than the standard notes pane for viewing attachments.

You can simple drag and drop one or multiple files into the attachments grid and they'll automatically be added to the notes.

Pre-requisites

In order to build and deploy these to your CDS instance you'll need the following:

If you want to deploy this and test it you'll obviously need some sort of PowerApps/Dynamics 365 license and instance. Grab a trial from here.

Building & Debugging

Once you've grabbed the code, navigate to the correct folder for the component you want, and run the following command from the terminal:

npm install

This will install all the dependencies (and make take a minute or two). Then run:

npm run start

This should bootstrap the component and run the harness to allow you to see the component running and debug if required.

Usage

Simply add any field to the Form, and configure it to use the control. It doesn't really matter what the field is as the control only uses the supplied ComponentFramework.Contextto grab the entity id and entity logical name. Your entity will need to support attachments (obviously) for this to work.

Then drag your files onto the control and they'll be uploaded and the grid will refresh.

Contributing

This is still very much a work in progress, and we would like to investigate the following:

  1. Better CSS Styling, if anyone has any recommendations, interested in working with Microsoft's Office Fabric when it becomes more available
  2. Better error handling for loading the control on an un-saved record, and for records which don't support notes
  3. Tests!

Just fork the repo, create a feature branch for your change and send us a PR.

About

Attachments grid for PCF

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published