UI Action link on Project and Project Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-17-2022 01:01 PM - edited 11-17-2022 01:57 PM
Hi Experts,
I am trying create an custom UI Action link on Project and Project Task to open the Project on "New Project Workspace". Like how we already have Planning Console UI Action link on Project and Project Task.
Can anyone please provide me some help on this.
Thanks,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 07:19 AM
Can someone help me on this.
Thanks,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 10:04 AM
Hi Jay,
Do you want the same view of Project when you click on related link like when you open Project Workspace and select a project from dropdown there?
If that is the case, then you can follow the 'Planning Console' UI Action, especially the second function: showGanttChartWithPMView and build a similar query to return the below URL:
https://<instance>.service-now.com/$pmview.do?sysparm_entity=project&sysparm_class_name=pm_project&s...
You can modify the URL parameters in the function as per above URL and try.
Let me know if that works.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-18-2022 12:17 PM
@mdash Thanks for the response!
Planning Console UI Action has the URL parameters are based on the planning console view ($pmview.do)
function showGanttChartWithPMView(sysId, className){
var url = new GlideURL('$pmview.do');
url.addParam('sysparm_view', 'planning');
url.addParam('sysparm_sub_view', 'planning_console');
url.addParam('sysparm_projid', sysId);
url.addParam('sysparm_class_name', className);
url.addParam('sysparm_entity', 'project');
if(window.frameElement && window.frameElement.id == 'ppsSlidingFrame') {
if(window.parent && window.parent.parent)
window.parent.parent.location.href = url.getURL();
}
else if(window.frameElement && window.frameElement.id != 'pm_view_content')
g_navigation.open(url.getURL());
else
window.parent.location.href = url.getURL();
}
But my requirement is to open the Project in Project Workspace. The Project Workspace URL looks like
https://<instance>.service-now.com/now/workspace/project/planner/pm_project/<sys_id of project>/<some number(not sure what it is)>
The UI Action link should work same like "New Project Workspace" button on "Planning Console"
I appreciate your help!
Thanks,
Jay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2024 12:25 PM
Hi @jay1111 - Any luck on the solution, I'm looking for the same requirement. Any leads would be appreciated. Thanks in advance!