How to hide "Create baseline" button from new project workspace Financials tab

RitaV
Tera Contributor

Hi 

There is requirement to hide baseline button under planning tab from the new project workspace. Please provide step by step guide to achieve this. Thank you!

RitaV_0-1741091187296.png

 

4 REPLIES 4

Bhavya11
Kilo Patron

Hi @RitaV ,

 

Can you try something like below

 

Goto Script include called "ProjectWorkspaceConfig" in 'getBlackListedActions' function change

blackListedActions['baselineButton'] = !gs.hasRole('project_manager');
to this:
blackListedActions['baselineButton'] =true;
 
 
If my response helped please mark it correct 
 
Thanks,
BK



 

If this information proves useful, kindly mark it as helpful or accepted solution.

Thanks,
BK

RitaV
Tera Contributor

Thanks for your response! However, the solution you proposed does not address the 'Create Baseline' button in the Financials tab. The change you suggested is specifically for hiding the Baseline button (icon) on the Planning tab in Project Workspace.

Did you ever figure out a solution to this? I'm having the same issue.

There are two possible ways to hide the Create Baseline button in the Planning tab of the new Project Workspace.
Option 1 - Hide the button in UI Builder (on a copied page)

  1. Open UI Builder.

  2. Navigate to Page Collections.

  3. Search for "Financials Core Page" and open it.

  4. Within the collection, locate the "Financials Default" page.
    This page contains the Create Baseline button.

  5. Duplicate the Financials Default page before making any changes (recommended to keep the out-of-the-box page unchanged).

  6. Open the copied page (edit).

  7. In the page content, locate the component named “Button create baseline”.

  8. Select the component and open its Visibility settings.
    Replace the existing visibility condition with 'true' .

  9. Save the changes.

  10. Ensure the copied page is used by the Project Workspace instead of the original default page.


Option 2 - Control button visibility via UX Client Script

The button visibility is controlled via the UX Client Script [sys_ux_client_script] “On metadata fetch success handler”, which defines whether the user has access to create a baseline.

In that script, the access check is defined as:

// Does user have access to create baseline
const payload = {
    event: 'hasAccessToCreateBaseline',
    payload: writeAccessByTable['sn_invst_pln_invst_investment_baseline_header']
};

If writeAccessByTable['sn_invst...'] is replaced with 'false', the "Create Baseline" button will be hidden for all users, regardless of role or permissions.