Form-based Dataverse Web Resources with React, Typescript and FluentUI - Part 2
A few months ago I posted this article on how to develop form-based HTML WebResources leveraging my npm package @_neronotte/cra-template-dataverse-webresource, and it generated a lot of interactions. In that article I've shown how to: create a standard React+TS+FluentUI WebResource using my npm package remove the references to ClientGlobalContext.js.aspx update the index.tsx file to accept Xrm and FormContext from the parent form update the local SDK removing dependencies from GlobalContext and adding the LocalFormContext class build and push to Dataverse edit the form js to inject the context into the webresource. Nothing so much complicated... but quite manual. Since then, I had the opportunity (or need, see it as you like) to create several WebResources that needed to be embedded into forms and... as usual... when I'm stuck on doing manual stuff 3 times in a row or more, i try to automate it as much as possible. Let's do it!
A few months ago I posted this article on how to develop form-based HTML WebResources leveraging my npm package @_neronotte/cra-template-dataverse-webresource, and it generated a lot of interactions.
In that article I've shown how to:
- create a standard React+TS+FluentUI WebResource using my npm package
- remove the references to
ClientGlobalContext.js.aspx
- update the
index.tsx
file to acceptXrm
andFormContext
from the parent form - update the local SDK removing dependencies from
GlobalContext
and adding theLocalFormContext
class - build and push to Dataverse
- edit the
form js
to inject the context into the webresource.
Nothing so much complicated... but quite manual.
Since then, I had the opportunity (or need, see it as you like) to create several WebResources that needed to be embedded into forms and... as usual... when I'm stuck on doing manual stuff 3 times in a row or more, i try to automate it as much as possible.