Confirgure Cell Context Menu in Project Workspace

LaetitiaJ
Tera Contributor

Hello everyone,

 

In the Project Workspace, when you open a project and go to the “Planning” menu, a table of subprojects and tasks appears. The component used for this view is “SN Task Planner 1.”

When you click the context menu (three dots) in a cell—for the short description, for example—a number of actions become available. I’d like to know if it’s possible to customize this menu and, if so, how.

 

Also, do you know if it's possible to highlight projects rather than tasks so we can better distinguish between them?

LaetitiaJ_0-1790860356414.png

 

 

Thank you in advance for your help.

4 REPLIES 4

sachinvic
Giga Guru

@LaetitiaJ 

 

For the context menu, first check the UI Actions / Declarative Actions used by the Project Workspace Planning experience rather than modifying the SN Task Planner 1 component itself.

You can check:

System Definition >> UI Actions

Search the relevant Project/Task table and review the actions used by the Planning view. For Workspace actions, also check:

Now Experience Framework >> Declarative Actions >> Action Assignments

 

The exact configuration can depend on the Project Workspace version and the action being added/removed. ServiceNow Community examples also show that Planning menu options are controlled through UI Actions and, for Workspace, their corresponding action configuration.

https://www.servicenow.com/community/spm-forum/unable-to-indent-tasks-in-project-workspace-planning-...

 

For the project highlighting requirement, I would avoid changing the standard component styling globally. First check whether the requirement can be handled through the existing planning hierarchy/row configuration. If the intention is to visually distinguish project records from task records, that may require a UI Builder customization depending on the exact version of Project Workspace.

So I would approach it in this order:

C5.png

 

Also, please share the Project Workspace application/version you're using. The available configuration points can differ between releases.

 

Helpful? Please mark the response as Accepted Solution ✅ and close the thread — this helps future readers find the solution faster.

 

Regards,
Sachinvic
✨ArchX Certified | ✨ 16x ServiceNow AI MVP

Hi Sachinvic,

 

Thank you for your suggestions. I had already performed the checks you recommended but hadn't found anything conclusive.
Since then, I've found a lead: the actions to be displayed are actually retrieved via the “ProjectWorkspaceConfig” script includes (blackListedActions: this.getBlackListedActions(markForDel, isOnlyProjectUser),).

In the “SN Task Planner 1” component, “Project Workspace Get Data 1” data resource is used to retrieve the data and store it in the “Blacklisted actions” property of the component.
I also found that there are initial values stored in a client state parameter called “workspaceBlackListedActions.”
This leads me to believe that we could make customizations to show or hide actions based on certain conditions. However, I don’t think we can add new actions or rename them…? If so, how would we do that? I can confirm that these actions are not registered as declarative or UI actions.

 

Regards,

Laetitia

Yes, your finding is correct. The actions in the SN Task Planner 1 context menu are handled by the component itself, so you won't find them as standard UI Actions or Declarative Actions.

 

The workspaceBlackListedActions value is intended to control the visibility of the existing OOTB actions. So you can use it to conditionally hide an action, but it isn't the mechanism for registering a completely new action or renaming an existing one. Community examples also show this approach being used to hide OOTB actions such as baselineButton.

https://www.servicenow.com/community/spm-forum/how-to-hide-baseline-button-from-new-project-workspac...

 

For your requirement:

Hide/show an existing action >> workspaceBlackListedActions / component configuration
Add a new action >> implement it through the appropriate UI Builder/UX action mechanism and add it to the component/page; it won't be added through the blacklist


Rename an OOTB action >> avoid modifying the OOTB component/script; use a supported customization/extension approach if the component exposes one.

 

I would also avoid modifying ProjectWorkspaceConfig directly unless there is no supported configuration option, since that would be an OOTB customization and could require rework during upgrades.

 

If the requirement is specifically to add a new option to the three-dot menu of SN Task Planner 1, that is a different requirement from hiding an existing option. In that case, the next step would be to check whether the component exposes an extension point for additional actions; if it doesn't, adding a custom action directly into the OOTB component would not be an OOTB-supported approach.

climacool23
Mega Contributor

i can't understand ?