Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
92b184b
Create test.js
raghavs046 Oct 10, 2025
f0add90
Delete Specialized Areas/Fix scripts/test.js
raghavs046 Oct 10, 2025
dd25d58
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 10, 2025
3d5e590
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 12, 2025
12517a1
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 12, 2025
c03f587
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 12, 2025
ff54be1
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 13, 2025
d0386e5
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 13, 2025
4066ba7
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 13, 2025
94d4e3d
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 13, 2025
a67cdb7
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 13, 2025
4072f2a
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 14, 2025
cb8eca3
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 14, 2025
50fcdcd
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 14, 2025
cdf7043
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 14, 2025
303e53f
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 15, 2025
ffa9e63
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 15, 2025
42f5913
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 16, 2025
da2102c
Update server.js
raghavs046 Oct 16, 2025
7ec638a
Update body.html
raghavs046 Oct 16, 2025
20a33be
Create option schema.js
raghavs046 Oct 16, 2025
134d838
Create css.js
raghavs046 Oct 16, 2025
fa1a9c9
Update README.md
raghavs046 Oct 16, 2025
fed7521
Update README.md
raghavs046 Oct 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Widget will create a button that will only be visable to users with the itil role that will take them to the same record in platform. will work with the form and standard ticket pages (or anywhere with the table and sysId in the url.
**This is an enhancement to the current code**
1. Added "open in SOW" Button to open the record in service operations workspace, since it is gaining popularity now.
2. Enhanced the visibility condition so that the button is only visible on pages having sys_id and table in url.
3. Enhanced css to improve visibility of button.

see also [on Share](https://developer.servicenow.com/connect.do#!/share/contents/6592535_open_in_platform_widget?t=PRODUCT_DETAILS)
Widget will create a button that will only be visable to users with the itil role that will take them to the same record in platform. will work with the form and standard ticket pages (or anywhere with the table and sysId in the url.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<div>
<span ng-if="::data.role==true">
<a href="{{::data.url}}" target='_blank'class='btn btn-default'>{{::options.button_text}}</a>
</span>
<span class="btn-cntr" ng-if="::data.role==true">
<a href="{{::data.platform_url}}" target='_blank'class='btn btn-default'>{{::options.open_in_platform}}</a><br> <!--Platform button configuration-->
<a href="{{::data.sow_url}}" target='_blank'class='btn btn-default'>{{::options.open_in_sow}}</a> <!--SOW button configuration-->
</span>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
This styling will align buttons on 2 ends of the div.
*/
.btn-cntr{
display: flex;
justify-content: space-between;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"name":"open_in_platform",
"type":"string",
"label":"Name for Plarform Button",
"default_value":"Open in Platform"
},
{
"name":"open_in_sow",
"type":"string",
"label":"Name for SOW Button",
"default_value":"Open in SOW"
}
]
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
(function() {
data.table = input.table || $sp.getParameter("table");
data.sys_id = input.sys_id || $sp.getParameter("sys_id");

data.url = "/nav_to.do?uri="+data.table+".do?sys_id="+data.sys_id;

data.role = false;
if (gs.hasRole("itil")){
data.role = true;
}
/*
Code will get table and sys_id parameter from url and create url for platform and sow.
This widget can be used in any page having sys_id and table in url , eg: ticket page.
*/
data.table = input.table || $sp.getParameter("table"); // get table from url
data.sys_id = input.sys_id || $sp.getParameter("sys_id"); // get sys_id from url

data.platform_url = "/nav_to.do?uri=" + data.table + ".do?sys_id=" + data.sys_id;
data.sow_url = "now/sow/record/" + data.table + "/" + data.sys_id;

data.role = false;
if (gs.hasRole("itil") && data.table && data.sys_id) { // only visible to users with itil role and if url has required parameters.
data.role = true;
}
})();
Loading