cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vile
Frequent Visitor

File Locked trying to move it after create data on CDS and Excel file from Sharepoint folder

Hi im facing this issue that is driving me nuts... is someone else facing it or some time faces it and find a solution?

 

this is the message i receive

 

"message": "File 'Shared Documents/Sales/FULLPATH+EXCELFILENAME.xlsx' cannot be moved because it is in locked mode.\r\nclientRequestId: 1a5807a8-0708-4038-8b97-f5bef6e827f1\r\nserviceRequestId: 1a5807a8-0708-4038-8b97-f5bef6e827f1"

 

IssueMovingFile.png

 

Im not sure it is had something to be related with the functions im using, in this case im comparing the file name from its headers with a value in a variable, if returns true, then get the excel table and list table rows, after that im filtering and array from the value returned from the list table rows to dont retrieve the empty id records, after that i do another filter array to exclude too the non-country rows, then with a ParseJSON i create the object with the columns the excel file table had and then start the listing from the CDS entity records

 

2IssueMovingFile.png

 

any help/guidance will be very appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bacao-msft
Community Support
Community Support

 

Hi @Vile ,

 

If there is a write operation to File in the previous action, the file will be locked.

 

You could add a Delay action in front of the Move file action and delay the execution of the following action after 3-5 minutes.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-bacao-msft
Community Support
Community Support

 

Hi @Vile ,

 

If there is a write operation to File in the previous action, the file will be locked.

 

You could add a Delay action in front of the Move file action and delay the execution of the following action after 3-5 minutes.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Rana
Helper I
Helper I

Hi @v-bacao-msft ,

 

Adding a delay of 10 mins helped me to get over the file locked error. Thanks for your help. 

Regards,

Rana

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,419)