Issue: We have a SharePoint site that has many libraries, each library has many folders, each folders is actual a GUID to a D365 CE case. We have a custom field on the case which records the number of attachments uploaded to a case. The OOB process moves these attachments from the D365 CE database to the correct SharePoint folder for the case. I have a flow that updates the custom field when a file is added to the library. However, I’m trying to use the trigger above, when a file is removed, but it will not provide all of the data required to update the field.
Data proved by trigger:
"body": {
"ID": 1341,
"Name": "ErrorDetails (29)",
"FileNameWithExtension": "ErrorDetails (29).txt",
"DeletedByUserName": "User Name",
"TimeDeleted": "2021-02-16T19:14:45Z",
"IsFolder": false
}
data missing: is the folder for the file.
Question 1: Is this all of the data provided by this trigger or are there other permissions required to return more data? If so, what permissions are required to determine the folder the file was in prior to it being deleted?
Question 2: If no other data may be returned by this trigger is there another option to get this data?
The above mentioned JSON is all of the data provided by the trigger, this is not related with the permissions and the JSON will remain the same though you update any permissions as this is the default designed by Microsoft.
For more information about the outputs of the trigger action, please check the link - SharePoint - Connectors | Microsoft Docs
The other action that I think might help in this scenario is "For a selected item" this might sound a little odd where user instead of doing a delete has to click on the flow icon and run the flow for deletion but this way you can capture in which folder the file was present before doing the delete step.
Steps --> For a selected item --> Get file details --> Store the file and folder info --> Delete the file
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
if the information shared helps you, please consider giving a thumbs up 👍 and mark solution as resolved
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
13 | |
12 | |
10 | |
9 | |
6 |
User | Count |
---|---|
27 | |
20 | |
13 | |
12 | |
10 |