
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-15-2022 09:05 AM
Hi Community,
I need to amend the qualifier for the project_manager field from pm_project form and I don't know where on the platform I need to go to change it ->
What element on the platform does this script call out?
I am aware the role it's calling is it_project_manager. I need to have another role listed besides this one. Is there a way to amend this or would it be better to update the behaviour of the field altogether and just list the roles I need?
Thank you.
Paula
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2022 04:23 AM
Received the following answer from ServiceNow Support, should anybody else might need it:
--------------
It invokes Java API exposed to Scripting, "SNC" signifies that. And SNC.PPMConfig.getProjectRole get you the respective role based on table and teamspace.
There will be different roles for teamspaces.
In case of pm_project(or without any teamspaces), it would return it_project_manager here.
I have checked SNC.PPMConfig.getProjectRole api is not hardcoded.OOTB we have it project manager and teamspace project manager role.You can customize this api to check another roles.It is just a javascript.You can simply create a new role and use this API to check the newly created role.
SNC.PPMConfig.getProjectRole api will get you only OOTB roles like it_project_manager, tsp1_project_manager for teamspace 1 or whatever teamspace prefix you have configured in teamspace configuration like if you configure teamspace prefix as ctp1, it will return ctp1_project_manager
You can append your code in front the javascript code in that ref qualifier field itself.
Also, if you wish you can replace the script in that field with your own. If you want to find people with the other role, you need to return a list of sys_ids.
--------------------
That API is in java layer. We can not update it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2022 04:23 AM
Received the following answer from ServiceNow Support, should anybody else might need it:
--------------
It invokes Java API exposed to Scripting, "SNC" signifies that. And SNC.PPMConfig.getProjectRole get you the respective role based on table and teamspace.
There will be different roles for teamspaces.
In case of pm_project(or without any teamspaces), it would return it_project_manager here.
I have checked SNC.PPMConfig.getProjectRole api is not hardcoded.OOTB we have it project manager and teamspace project manager role.You can customize this api to check another roles.It is just a javascript.You can simply create a new role and use this API to check the newly created role.
SNC.PPMConfig.getProjectRole api will get you only OOTB roles like it_project_manager, tsp1_project_manager for teamspace 1 or whatever teamspace prefix you have configured in teamspace configuration like if you configure teamspace prefix as ctp1, it will return ctp1_project_manager
You can append your code in front the javascript code in that ref qualifier field itself.
Also, if you wish you can replace the script in that field with your own. If you want to find people with the other role, you need to return a list of sys_ids.
--------------------
That API is in java layer. We can not update it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2023 11:22 AM
Please provide steps by steps instructions for the following scenario. I have created a new role: "u_project_viewer" which is intended to have read access to projects for which the user is added as "additional assignees" in the Project Details. I need to enable this user / role to see the relevant projects and details in Project Workspace and the Project Details.
How do I modify or call the SNC.PPMConfig.getProjectRole api to retrieve this "u_project_viewer" role to validate access to the specific projects?
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2023 08:17 AM
Hi Truman, for your use case if you can I'd suggest to use sn_ppm_read which is an OOTB role and falls under Business Stakeholder licence