PowerApps Component Framework (PCF) control to list and download Note (annotation) attachments from Dataverse.
- Install dependencies:
npm install
- Build the control:
npm run build
- Run locally (dev host):
npm start
- Control entry:
DocumentViewer— DocumentViewer/index.ts - Main UI:
MainContainerComponent— DocumentViewer/MainContainerComponent.tsx - Tag UI components: DocumentViewer/TagComponent.tsx, DocumentViewer/TagIconComponent.tsx, DocumentViewer/TagLoaderComponent.tsx, DocumentViewer/WarningTagComponent.tsx
- Service & types:
AnnotationService,IAnnotationService— DocumentViewer/services/AnnotationService.ts & DocumentViewer/services/IAnnotationService.ts - Model:
ITag— DocumentViewer/models.ts - PCF manifest: DocumentViewer/ControlManifest.Input.xml
- Build/config: package.json, tsconfig.json, pcfconfig.json
- Uses the WebAPI feature to query annotation (Note) records for an entity and renders them as clickable tags.
- Downloads attachment content (base64) via the Dataverse Web API and triggers a browser download (
AnnotationService).
Note this PCF is for model driven app only. inside the
index.tsyou will see that it is trying to fetch the client Url and the record id in which the component is being hosted. Possibly neither is supported action within a PCF
- React 16 is used (see package.json).
- Styles live in DocumentViewer/styles.css.
- Generated files are ignored (see .gitignore). Build artifacts are output to
out/controlsper pcfconfig.json.
This project is licensed under the MIT License. See the LICENSE file for details.