Add attachments to your Common Data Service entities
Hi everyone, today we are excited to announce that the attachments feature (including both notes and attachments) is available for PowerApps users with CDS. As we do with SharePoint, you can now use the attachments control to add files to your CDS entities (or remove them) on any device. And, if you are on a mobile device you can add existing photos on your phone.
How do I enable my CDS entity for attachments?
To enable your CDS entity for notes and attachments, first, choose “Data” and then “Entities”.
If you are working with standard entities, you will that this has usually already been enabled. If you are creating a new entity, then check the “Enable attachments” option when you create the entity. Or, if you already have an entity that you want to enable it for, you can choose the Settings tab for the entity and set it there. Once set, it cannot be undone.
How can I use my CDS entity with attachments in PowerApps?
If you are working with model-driven applications, this feature is the same feature you have traditionally used with entities. And, that feature continues to work exactly as it has always worked. This new feature makes the notes and attachments feature available to canvas-based applications. If you have previously worked with SharePoint attachments in PowerApps, you will find they behave very similarly.
If you automatically generate your application from CDS, you will see an attachment control on the edit screen. For instance, for the ‘Lesson’ entity above you will see a screen like this:
From this point, you can directly attach files (such as images and documents) and they will be saved to your application. If you generate an app from data, it will not automatically put the attachment control on the details screen. You will need to add it from the field list. Select the detailForm on the details screen and open the Data pane for the form. Then check the attachment field – this will add the Attachment control to the screen. You can then view by selecting items in the attachment control list.
Use this same process to add the attachment control to both your edit and detail screens for applications you have previously created.
There is an initial 10 MB limit on the size of the attachments. This limit will go up over time.
If you have feedback on this feature, please let us know in the comment section below.
Thanks