Auto Folder Creation (AFC)
Summary: The Auto Folder Creation process is a Cartularius automation feature that generates and maintains a folder hierarchy based on your Salesforce record model and custom configuration. When a record is created in Salesforce, Cartularius generates folders according to the configured AFC Objects and AFC Folders.
Auto Folder Creation (AFC) is a Cartularius feature that automatically creates and maintains a folder hierarchy for Salesforce records based on admin-defined configuration. Standard Salesforce objects can be enabled and configured by admins without developer work, while custom objects require developer implementation (Apex triggers + a small setup enablement step) so the AFC process runs for those objects.
When to use this?
Cartularius uses AFC when you want to:
- Automatically create a consistent folder structure when records are created.
- Keep folder names in sync when records are updated (for example, when a record name changes).
- Perform maintenance when records are deleted.
- Display related record folders in the UI (Related Folders / Indirect Related Folders) to improve navigation.
What are the prerequisites?
- Cartularius is installed and available in your org.
- Coordination between Admins (configuration) and Developers (custom object trigger enablement).
- For custom objects: ability to deploy Apex triggers and update setup metadata (Global Value Set).
How does it work in Cartularius?
The AFC process consists of a predefined configuration and a runtime execution.
Predefined configuration
Admins define the configuration that the AFC process uses to create and display folder hierarchies within Cartularius. Configuration includes:
- AFC Objects: enable AFC behavior for an object and define its root folder and its behavior.
- AFC Folders (technically optional): define which folders and subfolders exist within the hierarchy.
- AFC Folder File Categories (optional): drive how files are categorized/organized within folders.
- AFC Folder Translations (optional): define translated folder names for multilingual users.
- Related Folders / Indirect Related Folders (optional): specify which files and folders of related records should be displayed when viewing a record.
Runtime execution
- Standard objects: Cartularius provides trigger handlers that start the AFC process when the object is enabled in setup.
- Custom objects: you must implement an Apex trigger that calls Cartularius AFC entry points, so folder creation/rename/delete operations occur as part of the record lifecycle.
