Upload Attachments from Canvas App to Dataverse
Requesting attachments is a common use case we encounter every now and than when collecting information from the user for requests tied to cases, contact creation etc.
Typically this would require the help of a developer in the pre low-code no-code days when we need to build an attachment control to capture attachments from the user. For example, a web resource with fields and custom built attachments control to capture this information.
With Canvas Apps, developing something like this becomes very easy and just takes a few minutes. Let's consider the below form for instance. This just takes like around 5 minutes to design in the canvas app. If you are new to canvas app refer here for an overview of designing a form
Now we have everything ready for submitting our form, but we also need attachments. Essentially we want to capture attachments as Notes in Dataverse, with the regarding set to the Contact or whichever record you are creating.
Our first immediate reaction to this requirement would be something like, I should be easily able to find this either under the Input Section or the Media section. But it's not available there :(
After a little bit of reading through other community blogs, it's actually available as a Field on the form control, similar to other fields we have added above. Here is how we can add this.
That's it! We can now add attachments during the form submission without much effort.
Here is a reference to all the canvas app controls. Have a great day!