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 c8c0892 commit 84fefd6Copy full SHA for 84fefd6
Background Scripts/Replace Text/readme.md
@@ -0,0 +1,3 @@
1
+Purpose of the script is to help replace text IT_SAP with IT_ERP for all the Groups in Group table containing IT_SAP as keyword.
2
+It uses replace method which follows format replace(/'ABCD'/g,'PQR')
3
+where ABCD is to be replaced with PQR
Background Scripts/Replace Text/script.js
@@ -0,0 +1,9 @@
+var replacemyname;
+var replaceis=new GlideRecord('sys_user_group');
+replaceis.addEncodedQuery('nameLIKEIT_SAP');
4
+replaceis.query();
5
+while(replaceis.next())
6
+{
7
+replaceis.name=replaceis.name.replace(/IT_SAP/g, 'IT_ERP'); // /IT_SAP/g is oldvalue 'IT_ERP' is new value
8
+replaceis.update();
9
+}
0 commit comments