Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
31d7cdd
Add script to display user mentions in Service Portal
raghavs046 Oct 22, 2025
c06f874
Delete Modern Development/Service Portal Widgets/My Mentioned Items d…
raghavs046 Oct 22, 2025
f1473d6
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 22, 2025
1e5fce5
Create script.js
raghavs046 Oct 22, 2025
f368a8d
Delete Modern Development/Service Portal Widgets/My Mentioned Items d…
raghavs046 Oct 22, 2025
f2ce7d2
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 23, 2025
c3f00eb
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 23, 2025
5752145
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 23, 2025
df002e4
Create script.js
raghavs046 Oct 23, 2025
31be0ba
Delete Server-Side Components/Scheduled Jobs/Retire Rating 1 Articles…
raghavs046 Oct 23, 2025
db7b48d
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 24, 2025
dd6ade3
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 24, 2025
6579f1b
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 25, 2025
02b9a72
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 27, 2025
8e55fcb
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 27, 2025
a59cfcb
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 28, 2025
3b8d029
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 28, 2025
6065b0b
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 28, 2025
ba22acd
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Oct 31, 2025
5516679
Merge branch 'ServiceNowDevProgram:main' into main
raghavs046 Dec 14, 2025
ebc852c
Add getJson function to fetch table fields
raghavs046 Dec 14, 2025
883c547
Delete Specialized Areas/Fix scripts/script.js
raghavs046 Dec 14, 2025
2dacbe4
Add getJson function for JSON table retrieval
raghavs046 Dec 14, 2025
9f18b15
Add README for Create Table JSON script
raghavs046 Dec 14, 2025
85cd5f2
Fix typo in README for JSON creation script
raghavs046 Dec 14, 2025
8be26c3
Change gs.print to return JSON string
raghavs046 Dec 15, 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
3 changes: 3 additions & 0 deletions Specialized Areas/Fix scripts/Create Table JSON/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This Fix script will create JSON of all or specified fields of a table.
The developer need to pass the table and and fieldnames to function. If no field name is specified, the JSON will contain all fields of table.
This will be helpful incase of inbound integrations where the third part application needs JSON format of table.
12 changes: 12 additions & 0 deletions Specialized Areas/Fix scripts/Create Table JSON/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
getJson('incident', 'rfc,caller_id'); // pass table name and field names comma separated.
function getJson(tableName, fields) {
var jsonObj = {};
var eQry = gs.nil(fields) ? 'name=' + tableName : 'name=' + tableName + '^elementIN' + fields; // generate JSON of enitre table if no fields are specified.
var dict = new GlideRecord('sys_dictionary');
dict.addEncodedQuery(eQry);
dict.query();
while (dict.next()) {
jsonObj[dict.element] = '';
}
return JSON.stringify(jsonObj);
}