ramarao9 / AttachmentUploader

A Power App code component to easily upload one or more attachments on Dynamics365 records.
MIT License
16 stars 9 forks source link

Unable to use with Appointment records #29

Closed dlucialcg closed 1 year ago

dlucialcg commented 2 years ago

First off, the AttachmentUploader works great! I had added it to all the entities we use and our users love it. However, I was just notified yesterday, that it does not work on the Appointment entity. The grid just refreshes and nothing happens.

Thanks!

ramarao9 commented 2 years ago

@dlucialcg Thank you! Sorry for the delay. When testing on the Appointment entity, can you open the Developer tools in Chrome, add an attachment and send a screenshot of the network tab by searching for activitymimeattachment as below?

image

This would tell us if the PCF control is even trying to create an attachment or if it's failing silently when creating an attachment. If there is no POST request for activitymimeattachments, the next step would be to look at the console logs.

dlucialcg commented 2 years ago

I see what the issue is. We use the Timeline with the annotation entity and the PCF is setup to use the activitymimeattachments. So, the PCF is working but this one is working differently than using it with other entities. All our attachments from our data migration to Dynamics 365 was put into the annotation entity. Is there a way to configure this PCF to use the annotation entity instead of the activitymimeattachments?

ramarao9 commented 2 years ago

So, you want to upload attachments on the appointment entity or a different entity? Can you provide me the name of the entity and a screenshot of the configuration you have for the PCF control on the form? Specifically the ControlNameForRefresh property.

dlucialcg commented 2 years ago

No, the uploaded files for Appointments for our purposes need to go to the annotation entity, just like how it is configured for Tasks, Contacts, Lead, Opportunity, Account, etc. so that they can be seen in the Timeline. image

ramarao9 commented 2 years ago

I understand the issue now. Currently, the way the control is built, it defaults to Attachment for the Appointment entity instead of Notes. I would have to tweak the control to make this work the way you are hoping. Due to other priorities, I anticipate this taking 2-3 weeks to implement.

dlucialcg commented 2 years ago

Sounds good!

ramarao9 commented 2 years ago

@dlucialcg I have published the new release. Please give it a try and let me know if the issue has been resolved.

dlucialcg commented 2 years ago

Yes! Thanks for adding the "UseNoteAttachment" option! This issue is resolved.