How to get the current PA dashboard name /sys_id in the server/client script

Swathi12
Tera Expert

Hi,

 

I am trying the fetch the current PA dashboard name in my widget script and feed it to one of the custom tables I have created , so that it can be further used for referencing.

 

But I am not able to get the code for getting the dashboard name in my widget.

 

Regards,

Swathi

1 ACCEPTED SOLUTION

Swathi12
Tera Expert

Hi All,

 

I have got the solution , We can get the Dashboard sys id in the client script using SNC.dashboards.dashboard.dashboardSysId and pass it to script include for querying pa_dashboards table for getting the current dashboard name.

 

Do let me know if you have better ideas.

 

Regards,

Swathi

View solution in original post

5 REPLIES 5

Adam Stout
ServiceNow Employee
ServiceNow Employee

If it works, go with it.  However, since this isn't documented, be sure to validate this with each major upgrade as it may change in the future.