Move a (Record) Folder
In some cases, you may want to move a record folder after the initial folder structure has been set up. As an example you may have a folder Opportunities_OPEN where your Opportunity record folders initially reside. When opportunities are lost, you may want to move them to a different folder Opportunities_LOST.
This poses the following challenges:
24Files sets up the folder structure once, when the record page gets loaded for the first time.
You need an Apex action to move the record folder and all of its content.
You need a way to reset the folder structure after the move, such that the content of the record folder remains visible in the 24Files component.
The use case above can be built by means of a Record Triggered Flow as described in the video. You can use this as an inspiration to build a similar flow for your use case.
https://youtu.be/HxZwumSMfuoGeneral Flow overview
At the request of our customers, we’ve prepared a detailed guide on how to set up an example flow, which you can configure yourself. Please note that this flow is different from the one shown in our video.
Here are the details of the flow:

Overview of the Flow.
Setup a record triggered flow

Create assignment after Run Asynchronously
Once done create 2 new variable resources

Select variable as resource type

Resource 1 : MoveFileRequest
.png?inst-v=ecee15db-4b35-4897-874e-c8e40ff49347)
Create 2 Formula Fields to define the new and oldRecordPath
The path to our oldRecord in this example is the following where Fridge is the initial stage of our opportunity Funnel
"Shared Documents/Opportunities/Fridge/" +{!$Record.Name} +" " + {!$Record.Id}
The path to our newRecord in this example is the following where Prospecting is the next stage of our opportunity Funnel
"Shared Documents/Opportunities/Prospecting/" +{!$Record.Name} +" " + {!$Record.Id}

Resource 2 : AssignMoveRequest

Create Apex Action

Delete the related record in the 24Files Folder Structure Junction object.
