UI Action link on Project and Project Task

jay1111
Kilo Guru

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

4 REPLIES 4

jay1111
Kilo Guru

Can someone help me on this.

 

Thanks,

Jay

mdash
Giga Guru

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

jay1111
Kilo Guru

@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"

jay1111_0-1668802428161.png

 

I appreciate your help!

 

Thanks,

Jay

 

 

 

Hi @jay1111 - Any luck on the solution, I'm looking for the same requirement. Any leads would be appreciated. Thanks in advance!