OnClick of Report's details, it should redirect to portal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2020 05:30 AM
Hi Team,
Need some insight on below query.
I have a dashboard which contains multiple reports. On click of the record, it is redirecting to the backend table but i would like to redirect to the portal and show the details with some static field as column.
Regards,
Alok sahu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 03:40 AM
Hi Ankur,
Sure. Below is the approach i followed.
UI Script:
var url=document.referrer;
if(url.toString().indexOf("pa_dashboard.do?sysparm_dashboard=sys_id")>0 && top.location.toString().indexOf("table_name_list.do")>0){
var ga = new GlideAjax('FormatUrl') ;
ga.addParam('sysparm_name','convertUrl');
ga.addParam('sysparm_currentUrl',top.location);
ga.getXMLWait();
top.location=ga.getAnswer();
}
Script Include:
var FormatNpbuUrl = Class.create();
FormatNpbuUrl.prototype = Object.extendsObject(AbstractAjaxProcessor, {
convertUrl: function(){
var currentUrl=this.getParameter("sysparm_currentUrl");
var convert=GlideSPScriptable().mapUrlToSPUrl(currentUrl+'');
var buildUrl="https://"+"instance_name"+".service-now.com/"+'portal_name?'+convert;
return buildUrl;
},
type: 'FormatNpbuUrl'
});
Regards,
Alok sahu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 05:44 AM
Hi Alok,
From where this script is getting called i.e. when it would run?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-14-2020 10:30 PM
Hi Ankur,
On click of reports details it gets called up.
Regards,
Alok sahu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2020 02:20 AM
Hi Alok- I have similar kind of requirement.Can you please tell how did you call the UI script?any specific table name?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2020 06:58 AM
Hi,
You can try adding the redirection link to the report on top of the drill down section.
Thanks,
Vamshi Krishna S.
