We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce42607 commit 0391649Copy full SHA for 0391649
Specialized Areas/Fix scripts/Format JSON in String Fields/script.js
@@ -0,0 +1,9 @@
1
+/*
2
+This script will format the JSON data in string fields on forms.
3
+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.
4
+*/
5
+var chReq = new GlideRecord('change_request'); // Glide table.
6
+chReqch.get('c83c5e5347c12200e0ef563dbb9a7190'); // sys_id of record, can be replaced with encoded query for multiple records.
7
+
8
+chReq.u_json_field = JSON.stringify(JSON.parse(chReq.u_json_field), null, "\t");
9
+chReq.update();
0 commit comments