Version management
Overview
Version management provides several key benefits:
Safe Experimentation: Create and test changes in a new version without affecting the live version used on your pages.
Change Tracking: Maintain a history of component modifications.
Easy Rollback: Quickly revert to a previous, working version if needed.
Organized Development: Separate experimental and stable versions.
Key Concepts
Multiple Versions: Save unlimited versions of a single Dynamic Component.
Active Version: Only one version is "active" at a time. This version is displayed when you add the component to a Salesforce page.
Independent Versions: Each version is a separate copy. Changes to one version do not affect others until you activate a different version.
Viewing Component Versions (from Home Page)
You can view all saved versions of a specific Dynamic Component directly from the Avonni Dynamic Components home page within the Avonni Components app. This view serves as the starting point for managing individual versions.
Access the App: From the Salesforce App Launcher (nine-dot grid), open the "Avonni Components" app.
Find Your Component: Locate the Dynamic Component you want to manage in the main list.
View Versions: Click the dropdown arrow next to the component's name. This will expand the list to show all saved versions for that component.
Identify the Active Version: The currently active version (the one used on Lightning Pages) will be marked within the list (often with a specific status label like "Active", a checkmark, or distinct styling). Other versions might show statuses like "Draft".
From this version list, you can typically access actions like editing a specific version, activating a different version, or archiving the entire component (see subsequent sections for details on those actions).
Saving a New Version
Open and Edit: Open the Dynamic Component in the Component Builder and make your changes.
Save as New Version: Instead of clicking "Save" (which would overwrite the current version), select the option to save as a new version. This creates a new version, leaving the active version unchanged.
Automatic Numbering: Avonni automatically assigns a new version number (e.g., Version 2, Version 3).
Activating a Version
To make a specific version of your component live (the one displayed on pages):
Go to the Home Page: Navigate to the Avonni Dynamic Components home page.
Find Your Component: Locate your component in the list.
View Versions: Expand the list of versions.
Edit Targeted Version: Click the dropdown arrow next to the version you want to activate and select "Edit".
Activate: Click the "Activate" button. This makes the version chosen active and deactivates the previous one.
Deleting Dynamic Component Versions
Deleting versions requires careful handling due to the underlying Custom Metadata Type storage in Salesforce. While direct deletion isn't possible within the Avonni app, it guides you through the process.
Crucial Prerequisite: Check Component Usage!
Before deleting, ensure the component is NOT used on any Lightning Page. Deleting a used component will break those pages. Please remove it from all pages in the Lightning App Builder first.
Recommended Deletion Process (via Avonni App):
Archive the Dynamic Component:
You must first archive the entire Dynamic Component (all versions).
Use the component's action menu from the Avonni Dynamic Components home page and select "Archive."
Effect: Inactivates the component and all versions, moving it to the Archive section.
Navigate to the Archive Section: Go to the Archive folder/section within the Avonni Components app.
Locate the Archived Component & Version: Find and expand the component to view its archived versions.
Initiate Version Deletion: Select the specific version you want to delete and choose "Delete" from its action menu.
Redirection to Salesforce Setup:
Important: Clicking "Delete" in the Avonni App redirects you to the Custom Metadata Type record page in Salesforce Setup.
Confirm Deletion in Salesforce Setup: Click the standard Salesforce "Delete" link/button on the redirected page and confirm.
Understanding the Process: Avonni manages "versions," each corresponding to a Custom Metadata Type record. The app guides you to Salesforce Setup for permanent deletion.
Direct Deletion via Setup (Advanced - Use with Extreme Caution):
Technically, you can delete directly from Salesforce Setup:
Go to Setup > Custom Metadata Types
Click the Setup gear icon, then select Setup. In the Quick Find box, type Custom Metadata Types
and select it from the results.
Find the Avonni Dynamic Components Custom Metadata Type (e.g., avonnidc__Dynamic_Component__mdt).
In the list of Custom Metadata Types, locate the specific one used by Avonni Dynamic Components. The API name will typically be something like avonnidc__Dynamic_Component__mdt
Click "Manage Records."
On the Custom Metadata Type detail page, find the section for the records themselves and click the "Manage Records" button. This will display a list of all individual records, each representing a specific version of an Avonni Dynamic Component.
Locate the specific version's record (can be difficult).
This is the most critical and potentially complex step. You must meticulously identify the exact Custom Metadata record corresponding to the specific component version you intend to delete permanently.
Records might be identifiable by their "Label" (often the component name and version information) or "API Name." There is no visual "version list" here as in the Avonni app, making it much easier to select the wrong record.
Double-check and triple-check the details (Name, Last Modified Date, any identifying information) to ensure you have the correct record before proceeding. Mistakenly deleting the wrong record can have significant consequences.
Click the "Del" link.
Once you are absolutely certain you have identified the correct record for the version you wish to delete, click the "Del" (Delete) link in the "Action" column next to that specific record.
Salesforce will then ask you to confirm the deletion. Once confirmed, this action is immediate and permanent through this interface and bypasses any lifecycle management or safeguards within the Avonni app.
Final Note: Deletion is permanent. Before deleting, ensure the version is no longer needed and not in use. Consider keeping archived versions.
Important Notes about Deletion
Permanent Deletion (Advanced): Only experienced admins with backups should delete Custom Metadata Type records directly. Archiving is usually sufficient.
Example: Testing a New Button
You have a Dynamic Component named "ContactForm," with Version 1 active.
Add New Feature: You want to add a new button. You open "ContactForm" and add the button.
Save as New Version: You save this as Version 2. Version 1 remains active.
Test New Version: You test Version 2 (potentially on a test page).
Activate New Version: When satisfied, activate Version 2 from the Avonni Dynamic Components home page. Version 1 is now inactive, and Version 2 is live.
Avonni Dynamic Components include built-in version management, allowing you to save multiple versions of your components, track changes, and easily switch between different versions. This feature is similar to version control in Salesforce Flow Builder, but tailored for Dynamic Components.
Last updated
Was this helpful?