Skip to main content
Skip table of contents

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:

  1. 24Files sets up the folder structure once, when the record page gets loaded for the first time.

  2. You need an Apex action to move the record folder and all of its content.

  3. 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/HxZwumSMfuo

General 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:

image-20240930-080943.png

Overview of the Flow.

Setup a record triggered flow

image-20250310-173413.png

Create assignment after Run Asynchronously

Once done create 2 new variable resources

image-20250310-174125.png

Select variable as resource type

image-20250310-173757.png

Resource 1 : MoveFileRequest

image (40).png

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

CODE
"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

CODE
"Shared Documents/Opportunities/Prospecting/" +{!$Record.Name} +" " + {!$Record.Id}

image-20250313-082459.png

Resource 2 : AssignMoveRequest

image-20250312-162346.png

Create Apex Action

image-20250313-082042.png

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

image-20240930-080843.png

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.