We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

Project Workspace - Create new Baseline, Restrict "Create new" button

Shawn20
Tera Contributor

Hi Community, 

 

In the "Planning" tab of a Project in the project workspace, when I click the Baselines icon, the below little section shows up, and it has a button called "Create new". My goal is to restrict this "Create new" button to certain roles only. Where can I modify this?

 

Shawn20_0-1782510481341.png

 

Thanks!

 

3 REPLIES 3

Mariam_Ahmed
Tera Guru

Hi @Shawn20 ,

You can try checking the following UI Action and see if it controls the Create new button in the Baselines section.

https://<your_instance>/sys_ui_action.do?sys_id=9a213d14ef90010032a05ad595c0fb69

Try adding the required roles to the Requires Role tab or Condition on this UI Action and test whether it restricts the button's visibility for users without those roles.

If you found this response useful, please mark it as Helpful and accept it as the Solution to help others with similar questions.


Best regards,

Mariam Ahmed.

 

Mariam Ahmed

ServiceNow Developer | Here to Learn, Here to Share

Hi Mariam,

 

I have already updated that UI action you mentioned to the proper roles needed, but the Workspace one doesn't seem to reflect that.

Hi @Shawn20,

I was reading another post about hiding the Create Baseline button in Project Workspace, and someone suggested updating the related Script Include "ProjectWorkspaceConfig".
Script include: 

https://<your_instance>/sys_script_include.do?sys_id=84bd228577323010132628489a1061d4

Specifically, around line 241, try modifying the following line:

blackListedActions['baselineButton'] = !gs.hasRole('project_manager') || gs.hasRole('your_role');

You could try adding your role to that condition and see if it gives you the desired behavior.

That said, I'd recommend trying this only if you can't find another supported solution, since modifying an OOB Script Include is generally risky and may be overwritten during upgrades. If none of the supported approaches work, it would be best to create a ServiceNow support case so they can provide a supported workaround.

Related post: 

 

If you found this response useful, please mark it as Helpful and accept it as the Solution to help others with similar questions.

Best regards,

Mariam Ahmed.

Mariam Ahmed

ServiceNow Developer | Here to Learn, Here to Share