Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 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
4b58955
Create script.js
raghavs046 Oct 15, 2025
ce42607
Create README.md
raghavs046 Oct 15, 2025
0391649
Create script.js
raghavs046 Oct 15, 2025
0e33109
Create README.md
raghavs046 Oct 15, 2025
8d4b36b
Delete Specialized Areas/Beautify JSON Data in String Fields directory
raghavs046 Oct 15, 2025
bed7f3d
Update README.md
raghavs046 Oct 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
**Details**
1. This script will format the JSON data in string fields on forms.
2. There is on OOB attribute "json_view" which can be added to field but it always reqires an extra click and has loading time issues.

**How to use**
1. Run this script as Fix Script.
2. Replace the table name and encoded query as per your requirement.
3. Replace the field to be formatted as per the table selected.

**Before Formatting**
<img width="956" height="371" alt="Before1" src="https://github.com/user-attachments/assets/1b35dfaf-d2ad-44c3-bbd2-d3198664073b" />

**After Formatting**
<img width="950" height="382" alt="After" src="https://github.com/user-attachments/assets/c3a1c3c0-48bd-4d2f-9e27-fea0ed86004d" />

JSON.stringify() documentation : https://www.geeksforgeeks.org/javascript/javascript-json-stringify-method/
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
This script will format the JSON data in string fields on forms.
There is on OOB attribute "json_view" which can be added to field but it always reqires an extra click and has loading time issues.
*/
var chReq = new GlideRecord('change_request'); // Glide table.
chReqch.get('c83c5e5347c12200e0ef563dbb9a7190'); // sys_id of record, can be replaced with encoded query for multiple records.

chReq.u_json_field = JSON.stringify(JSON.parse(chReq.u_json_field), null, "\t");
chReq.update();
Loading