Hello Pragya,
To create a link to individual timesheets, try below steps:
1. Create your original portlet query with link to an HTML portlet.
2. The linked HTML portlet will have below Java script:
<script language="JavaScript1.2">
var url=window.document.URL;
url1=window.document.URL;
url2=window.document.URL;
var tsid = url.substr(url.indexOf("tsid=") + "tsid=".length);
var f_resid = url1.substr(url1.indexOf("resid=") + "resid=".length);
var resid = f_resid.substr(0,7);
var f_tpid = url2.substr(url2.indexOf("tpid=") + "tpid=".length);
var tpid = f_tpid.substr(0,7);
if (tsid.length > 8)
{
window.location.assign("http://<website>:3080/niku/app?action=timeadmin.editTimesheet&id=" + "&resid=" + resid + "&tpid=" + tpid);
}
else
{
window.location.assign("http://<website>:3080/niku/app?action=timeadmin.editTimesheet&id=" + tsid + "&resid=" + resid + "&tpid=" + tpid);
}
</script>
3. In the original portlet, also create a new field in column layout section as image and add the link to the HTML
4. Also, add the original portlet to a portlet page and in that portlet page, create three page parameters and link them with original portlets attributes of resource_id, timesheet_id and timperiod_id(these three attributes should be there in your query)
This will re-direct the image to the timesheet of the resource. But, till now I don't no how to return back to original page(only a workaround..doublw click on the browser back page).
Thanks,
Pragya Singh