Admin Guide - Add Custom Action in the Task Context Menu

    Last Modified On: November 4, 2026

     

    Overview

    The custom action menu item adds one entry to the Gantt task right-click menu. It hands the task to a Lightning web component that your org builds, and that component's reply lands in the Gantt as a new task row or as changes to the task.  Nothing is written to Salesforce until the user clicks the Gantt's Save button. 

     

    Use it when tasks must be created from controlled values, for example a picklistdriven window that fills the task name, category and custom fields from a standard catalogue. Users can still create and edit tasks the usual way; the menu item adds a path, it does not replace one. 


    The menu item runs in one of two modes, set by the Menu Item New Task checkbox: 

     

    ModeMenu Item New TaskWhat the Gantt sends your componentWhat your component's reply does
    New taskCheckedThe project Id onlyInserts a new task row directly below the right-clicked task, as an unsaved change.
    Update taskUncheckedThe right-clicked task's saved field valuesChanges the right-clicked task.

     

    The menu item shares its configuration and message channel with the existing custom action column. The column always works in  update-task mode; the menu items adds the new-task mode and the right-click entry point.

     

     

     

    In update-task mode the same round trip changes the right-clicked task instead of adding a row. The channel's API name is inspire1__ganttCustomActionChannel__c.

     

    Before you start

    You need four things in place before the menu item does anything useful. 

    • Inspire Planner JULY 2026 (2.8) OC 1 release or later. The menu item fields and the reply handling ship in that release. 
       
    • A companion Lightning web component. Inspire Planner does not ship the picklist window. Your org (or an implementation partner) builds it to the contract in Build the companion component below. 
       
    • The component on the same page as the Gantt. Add it to the Lightning record page that hosts the Inspire Planner Gantt, or to the app's utility bar. A component on a different page never receives the Gantt's message. 
       
    • Custom fields in the Gantt field set. A custom field your component sets must be in the inspire1__Inspire_Planner_Custom_Fields field set on Project Task (inspire1__Inspire_Planner_Custom_Fields_Task_List for Task List projects), and the user must be able to edit it. Fields added to the field set later become settable without any other change. 

     

    Who can configure it: an admin with the Customize Application permission, which covers both the custom setting data and placing the component in Lightning App Builder.

    Who sees it: in new-task mode, users who can edit the project. In update-task mode, users with read-only access see it too, and the message tells your component so it can open a view-only window.

     

    Configure the custom action

    The menu item is controlled by one hierarchy custom setting, Project Gantt Custom Action Config (inspire1__ProjectGanttCustomActionColumn__c). The setting changes only what the Gantt shows; it does not change any project or task data, and unchecking Menu Item Enabled turns the item off again. 

     

    Turn on the menu item
     

    1. In Setup, enter "Custom Settings" in the search box, then click Custom Settings.


       
    2. Click Manage next to Project Gantt Custom Action Config.


       
    3. Under Default Organization Level Value, click New (or Edit if a record already exists).


       
    4. Check the box for Menu Item Enabled. Then, enter a Menu Item Label - for example, "Add a standard task".


       
    5. Optional: enter a Menu Item Icon Name - for example, fa-solid fa-list-check.


       
    6. Check the box for Menu Item New Task for new-task mode, or leave it unchecked for update-task mode. Click Save.


       
    7. Verify: open a project in the Gantt, reload the page, and right-click a task. The menu shows your label and icon on the main menu, not inside the Add submenu. The screenshot below provides an example.

     

    Field reference

    Field labelAPI nameTypeWhat it controlsExample
    Menu Item Enabledinspire1__Menu_Item_Enabled__cCheckbox, default uncheckedShows the item on the task right-click menuChecked
    Menu Item Labelinspire1__Menu_Item_Label__cText (255)The menu text. Blank shows Custom ActionAdd standard task
    Menu Item Icon Nameinspire1__Menu_Item_Icon_Name__cText (255)Icon beside the menu text. Blank shows no iconfa-solid fa-list-check
    Menu Item New Taskinspire1__Menu_Item_New_Task__cCheckbox, default unchecked

    Checked: new-task mode

    Unchecked: update-task mode

    Checked
    Column Enabledinspire1__Enabled__cCheckbox, default uncheckedMakes the custom action available in the GanttUnchecked
    Column Labelinspire1__Column_Name__cText (255)Column header text and icon tooltipTask catalogue
    Column Icon Nameinspire1__Column_Icon_Name__cText (255)Icon shown in each row of the columnfa-solid fa-bolt



    *The three column fields were previously labeled Enabled, Column Name and Action Icon Name. Their API names are unchanged, so the existing configuration keeps working.

     

    Icons

    Enter Font Awesome class names separated by spaces, each starting with fa-: a style class and an icon class, such as fa-solid fa-clipboard-list. Classes that do not start with fa- (including a bare fa) are ignored. If the icon renders blank, the name is not in the Gantt's icon set; try another icon. 

     

     

    Show the label in other languages

    The label is free text, so Salesforce translation tools do not reach it, and the blank-label fallback Custom Action is English only. Because the setting is a hierarchy setting read for each user, you can give each language group its own label: 

     

    1. Click Manage next to Project Gantt Custom Action Config.


       
    2. Click New in the lower section.


       
    3. Set Location to the profile (or user) that should see the translated label. 


       
    4. Enter the translated Menu Item Label, for example - "Standardaufgabe hinzufügen". 


       
    5. Set every checkbox to match the org default. Blank text fields inherit the org default value, but checkboxes are stored as unchecked and do not inherit. 


       
    6. Click Save, then log in as a user with that profile and confirm the translated label. If language does not follow profile in your org, a combined label such as Add standard task / Standardaufgabe hinzufügen is the fallback.

     

    When changes appear

    The Gantt reads the setting when the project page loads, and the response is cached in the browser. After a change, users must reload the project page; if the old label persists, clear the browser cache for the Salesforce domain and reload. 

     

    Build the companion component

    Your component talks to the Gantt through one Lightning message channel: it listens for the Gantt's message, opens its own window, and publishes a reply on the same channel. Inspire Planner places no constraint on the window's size or design, because your component opens it. 
     

    Message channel Import @salesforce/messageChannel/inspire1__ganttCustomActionChannel__c. Subscribe with the default scope. With APPLICATION_SCOPE, copies of your component in background console tabs receive the message too and each opens a window.

     

    PropertyTypeMeaning
    _source TextAlways inspire-planner. Act only on messages that carry it, so your component 
    ignores its own replies.
    triggerTextcontextMenu for the menu item, column for the custom action column.
    readOnlyBooleantrue when the user cannot edit the project (no create and edit permission on Project Tasks, or read-only access to the project record). Show a view-only window and send no reply.
    taskObjectNew-task mode: inspire1__Project__c only, no Id. Update-task mode and the column: the task's last saved field values keyed by API name, including Id; blank fields are omitted. Unsaved edits on the row are not include.

    1. Never set _source to inspire-planner. The Gantt ignores messages that carry it. 
    2. New task: omit Id and pass back the inspire1__Project__c you received. The Gantt ignores a new-task reply whose project Id belongs to a different project. 
    3. Update: include the Id you received. A reply whose Id is not on the open Gantt is ignored. 
    4. Set unsavedChanges deliberately on updates. true makes the change a pending edit that the user saves with Save. false or omitted tells the Gantt the values are already saved, so it shows them without a pending change; only use that when your component has saved the record itself. New-task replies are always pending, whatever the flag says. 
    5. Send only the fields you want to set. Omitted keys are left as they are; a key set to null clears the field. Unknown keys and custom fields outside the field set are ignored without an error. 
    6. Several replies are fine. Each new-task reply inserts below the row the previous reply inserted, so rows appear in reply order. 

     

    Fields a reply can set

    Reply keyValue to send
    inspire1__Name__c (or Name)Text: the task name
    inspire1__Status__c, inspire1__Priority__c, 
    inspire1__Category__c, inspire1__Role__c
    Picklist API value
    inspire1__Multi_Role__cAPI values separated by ;
    inspire1__StartDate__c, 
    inspire1__ConstraintDate__c, 
    inspire1__Actual_Start_Date__c
    YYYY-MM-DD, placed at the project's working-day start time; YYYY-MM-DDTHH:mm:ss, used as local time; or an instant ending in Z or an offset, converted to the user's time zone
    inspire1__FinishDate__c, 
    inspire1__Actual_Finish_Date__c
    The same formats; a date-only value is placed at the working-day end time
    inspire1__Duration__c Number
    inspire1__DurationUnit__c d
    inspire1__ConstraintType__c The picklist value, such as Start No Earlier Than, or the Gantt form startnoearlierthan
    inspire1__Done__c Number, 0 to 100
    inspire1__Planned_Effort__c, 
    inspire1__Total_Planned_Effort__c, 
    inspire1__Actual_Effort__c
    Number of hours
    inspire1__Budgeted_Cost__c, 
    inspire1__Actual_Cost__c
    Number
    inspire1__Color__cSix-digit hex colour, with or without #
    inspire1__Internal_Only__c, 
    inspire1__Override_Completion_Rule__c
    true or false
    inspire1__Notes__c, 
    inspire1__External_Task_Subject__c
    Text
    inspire1__Predecessors__c, 
    inspire1__Successors__c, 
    inspire1__Deactivated_Dependencies__c
    A dependency list; see Dependencies below
    inspire1__BaselineStartDate__c, 
    inspire1__BaselineEndDate__c, and the 
    Baseline2 to Baseline5 pairs
    The same formats as the dates above
    Any field in the Gantt field set that the user can editNumber or numeric text; date YYYY-MM-DD; date-time ISO 8601 (shown in the user's time zone); picklist API value (the Gantt shows its label); multi-select A;B; lookup 
    record Id (the Gantt shows the record name the user can read); checkbox true or false; text as-is

    Numbers can be sent as numbers or as numeric text. A reply cannot set Assigned To (resource assignments), the parent task or the indent level. 

     

    Dates and defaults on a new task 

    A new row follows the same rules as a task typed into the Gantt, so a reply only needs to send what it knows. 

    The reply sendsThe new task gets
    Start and FinishBoth dates, with the duration between them, and a Start No Earlier Than constraint on the start
    Start OnlyA Start No Earlier Than constraint on that date; the duration sent, or 1 day
    Finish OnlyA Finish No Later Than constraint on that date; the duration sent, or 1 day
    A constraint type with its dateThat constraint instead of the automatic one
    No dates, in a manually scheduled projectThe project's default new-task start date; the duration sent, or 1 day
    No dates, in an automatically 
    scheduled project
    Dates from the scheduling engine
    No Status or PriorityNot Started and the org's default priority

    In backward-scheduled projects the automatic start constraint is Start No Later Than. Task List projects get no automatic constraint or date defaults.

     

    Status and % Complete 

    A reply gets the same sync as editing these cells in the Gantt, on new and existing tasks alike. If a reply sends both, % Complete wins. 

     

    The reply sendsThe Gantt also sets
    Status: a completed status, or Deferred% Complete 100
    Status: In Progress, on a task at 0%% Complete 10
    Status: Not Started % Complete 0
    % Complete 0Status Not Started
    % Complete 1 to 99, on a Not Started or completed taskStatus In Progress
    % Complete 100% Complete 100

    Moving to In Progress stamps today as the actual start, and a completed status stamps today as the actual finish. Actual start and finish dates in the reply override the stamped ones.

     

    Dependencies 

    inspire1__Predecessors__c and inspire1__Successors__c take entries separated by ; or ,. Each entry names the other task by the number the Gantt's Predecessors column uses for it, or by its Salesforce Id, followed by an optional type and lag. 

     

    EntryMeaning
    2Finish-to-start link with task 2
    4SS+2dStart-to-start link with task 4, 2 days' lag
    5FF-1dFinish-to-finish link with task 5, 1 day's lead
    a0Ag8000005r4CIEAY Finish-to-start link with that task

    Types are FS (the default), SS, FF and SF; the stored codes ES, EE and SE also work. For lag units, only d (days) is supported.

    • A list replaces that side of the task's links, the same as editing its Predecessors cell; an empty value removes them.
    • Task numbers mean the rows as the user saw them when they rightclicked, before the new row shifts the rows below it. 
    • Entries that cannot be read, or that name a task not on the Gantt, are skipped without an error. inspire1__Deactivated_Dependencies__c lists the numbers of predecessors to link as inactive. 
    • New links are always pending and save with the Gantt's Save, even in an update reply sent with unsavedChanges: false.

     

    Reference component 

    A minimal listener, with the picklist window in a separate LightningModal(c/taskPickerModal) that closes with the chosen values keyed by API name:


    Expose the component for lightning__RecordPage (and lightning__UtilityBar if you place it there). It needs no visible markup on the page. 

     

    What users see 

    For a project manager, the menu item is one right-click and one window; the task is saved with the rest of their changes. 

    1. Right-click a task row or its bar in the Gantt. 
    2. Click the menu item, for example - Add standard task. Your component's window opens. 
    3. Choose the values and click the window's save button. The window closes.
    4. In new-task mode, a new row appears directly below the task you rightclicked and scrolls into view. In update-task mode, the right-clicked task's cells change. Changed cells carry the Gantt's usual unsaved-change marker. 
    5. Click the Gantt's Save button to write the task to Salesforce. 
       

    Until step 5, the new row behaves like any other unsaved change: it can be edited, undone, or discarded by leaving the project without saving. 

     

    Where a new row lands

    Right-clicked rowNew row position
    A regular taskDirectly below it, at the same indent level
    A summary (parent) task Below the summary's last subtask, at the summary's level
    The empty row at the bottom of the schedule At the end of the schedule
    Any row, when the window sends several 
    tasks
    Each one below the previous new row, in the order sent

     

    When the item is hidden

    • New-task mode: hidden from users who cannot edit the project, meaning they lack create and edit permission on Project Tasks or have read-only access to the project record.
       
    • Update-task mode: shown to those users too, with readOnly: true in the message; hidden on rows that have not been saved yet, and on internalonly tasks when the Gantt runs in an Experience Cloud site.

     

    Limits and known behaviours 

    • One custom action per user. The Gantt reads a single configuration record for each user, so it shows at most one custom menu item and one custom action column. 
       
    • Lightning web components only. The menu item cannot launch a screen flow in this release. 
       
    • Launch-only use. To open your component without creating a row, use update-task mode and have the component send no reply.
       
    • No error when nothing listens. If your component is not on the page, the menu item does nothing and shows no message.
       
    • readOnly is advisory. The Gantt sends the flag but applies an update reply regardless, so your component must not reply when readOnly is true.
       
    • Omitted unsavedChanges means saved. An update reply without unsavedChanges: true is shown as already saved and is never written by the Gantt's Save. 
       
    • Column Enabled now defaults to unchecked. Existing configuration records keep their saved value; only new records start unchecked.

     

    Troubleshooting

    SymptomLikely causeFix
    The menu item is missingMenu Item Enabled is unchecked for this user's profile or user record, or the page still has the old setting cachedCheck every record on the Manage page, then reload; clear the browser cache if needed
    The menu item is missing for some users onlyNew-task mode: the user cannot edit the project. Update-task mode: the row is not saved yet, or is an internal-only task in Experience CloudConfirm the user's access and mode against When the item is hidden
    The menu reads Custom ActionMenu Item Label is blank at every level 
    of the hierarchy for this user
    Enter a label on the org default or the user's profile record
    The icon is blank A class does not start with fa-, or the icon is not in the Gantt's icon setUse the fa-solid fa-<name> form, or choose another icon
    Clicking the item does nothingYour component is not on this page, or it imports the channel without the inspire1__ prefixAdd the component to the record page or utility bar; check the import
    The window opens twice, or in other tabsThe component is placed twice (page and utility bar), or subscribes with APPLICATION_SCOPEPlace it once; use the default scope
    The window reopens after it savesThe component reacts to its own reply Ignore messages whose _source is not inspire-planner
    The reply changes 
    nothing
    The reply sets _source to inspireplanner, carries another project's Id, or carries an Id not on the GanttRemove _source; pass back the Ids the Gantt sent
    A custom field stays blankThe field is not in the Gantt field set, the user cannot edit it, or the key is misspelledAdd the field to the field set and check field-level security and the API name
    A lookup shows an Id instead of a nameThe user cannot read the referenced record, or the Id is invalidCheck the user's access to that record
    Updated values are gone after a reloadThe update reply omitted unsavedChanges: true, so the Gantt never saved itSend unsavedChanges: true, or save the record in your component
    A predecessor or successor is not linkedThe entry cannot be read, or its task number or Id is not on the GanttCheck the entry against the formats in Dependencies and use the numbers from the Predecessors column
     
    A new task has a constraint nobody setThe reply sent a Start or Finish date without a constraint type, so the Gantt added oneExpected behaviour; send inspire1__ConstraintType__c if the task needs a different constraint

     


    Tags

    Administration

    « Previous Article