cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
krishnags
Responsive Resident
Responsive Resident

download attachments (annotations)

Hi Everyone,

 

As part of a requirement, I had to create a custom Grid for Annotations (in PowerApps Portals) to show the list attachments available for a specific case record, which is working great. But, in order to download the attachments Portals using an API it seems, which is looking like /_entity/annotation/xxxxxxxx-xxxx-xxxx-xxxx-000d3a3277a4/7b138792-xxxx-xxxx-9241-8f8d96d8c372.

 

The xxxxxxxx-xxxx-xxxx-xxxx-000d3a3277a4 is Annotation GUID, but not sure about that another GUID 7b138792-xxxx-xxxx-9241-8f8d96d8c372.

 

Any suggestions, would be helpful. It is required to have the download the attachments 

5 REPLIES 5
mbayes
Resolver I
Resolver I

Hey Krish,

 

We had a similar requirement recently for a client where we needed to build a custom grid that allowed us to download notes associated to the records present in said grid.

 

What we discovered is you can just ignore the second GUID for the sake of downloading the document. I am unsure what it is in reference to, but the format below is what we used:

 

'<a href="/_entity/annotation/' + value.annotationid + '" alt="' + value.annotationsubject + '">' + value.filename + '</a>'

 

We built the URL just using the GUID of the annotation in the format "/_entity/annotation/GUID" and added in the File Name of the note as our text to render in our grid.

 

Hopefully this clears up some confusing and allows you to download your notes!
Thanks!

Matt Bayes
I have a blog! Please follow me here for Dynamics 365 and Power Platform tips!

newmay
Helper V
Helper V

Hi @mbayes 

 

We got the same requirement, yet if we follow  <portal url>/_entity/annotation/GUID" it only shows this:

 

newmay_0-1637139475209.png

Any clue why this happens?

 

newmay
Helper V
Helper V

Hi @mbayes 

 

We got the same requirement, yet if we follow  <portal url>/_entity/annotation/GUID" it only shows this:

 

newmay_0-1637139475209.png

Any clue why this happens?

 

Hey @newmay 

 

Interesting error - I think there would be only two logical answers to why you are getting the "Not Found" message.

 

First, this could be tied to Entity Permissions. If you do not have the appropriate Entity Permissions setup in your portal for the annotation entity then the note may be inaccessible. Please verify you have the proper permissions, and if you wanted to run a quick test you could setup a global annotation permission with full permissions for the Authenticated and Anonymous roles.

 

The second issue could be that the GUID you are using in your URL format is not the GUID for the note itself but for something else. This is probably unlikely but just double-check that you are populating that URL with the proper GUID. You could verify this in the CRM system by finding the note that matches that GUID and trying to open it (just to ensure it does exist).

Hopefully this helps! If not I'll try to replicate and get back to you with a resolution!

THanks!

 

Matt Bayes

@mbayes You were right... it was just the entity permission that was not set properly for the notes(annotations) I am sorry .. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel News & Announcements 768460.png

What's New in the Community?

Check out the latest News & Events in the community!

MPP IDEAS updated 768x460.png

Ideas

Discover ideas and concepts from users like you for how to use Power Pages and take your work to the next level.

Users online (2,847)