Add "New Timeline" Button to Existing Timelines


ADDON REQUIRED
QuoteX Lite Layout Add-on



Objective: Allow users to create a new Timeline linked to the parent Quote directly from an existing Timeline record page without making it a "child" of the current Timeline.


Technical Approach

Instead of modifying the managed package or building a complex before-save flow, we will create a lightweight custom Aura Component wrapper. This wrapper uses Lightning Data Service (LDS) to find the parent Quote's ID from the current Timeline, and then passes that ID right back into the package's existing logic - keeping the package logic completely intact.


Implementation Steps
1. Create the Aura Component: Create a new Aura component named AddNewTimelineFromTimeline.

Implement the following interfaces to make it available as a Quick Action and allow it to read the current record context:

implements="force:lightningQuickActionWithoutHeader, force:hasRecordId"


2. Configure the Data Loader: Use <force:recordData> within the component to load the current Timeline record. Make sure to query the specific lookup field pointing to the Parent Quote/Estimate.


3. Embed the Package Logic: Place the QuoteX Lite package component inside your new Aura wrapper. Bind its recordId to the parent ID you fetched in Step 2.



<psce_ext:CodeyLabs_AddNewTimeline aura:id="addnewtimelinefromtimeline" recordId="{!v.parentEstimate.Id}"/>



4. Create and Assign the Button: Navigate to Setup > Object Manager > Timeline.

  1. Go to Buttons, Links, and Actions and click New Action.
  2. Set Action Type to Lightning Component and select your new wrapper component.
  3. Save and add this button to your Quote Record Page (Tiimeline Sections).





Redirecting you to the article... Click here if you are not redirected automatically.