Created
December 3, 2021 20:11
-
-
Save ChecksumFailed/24e2b82be1a404d126e9ce4b70d570d8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
function newGrObject(tbl, obj) { | |
var grRec = new GlideRecord(tbl); | |
new GlideRecordUtil().mergeToGR(obj, grRec); | |
grRec.insert(); | |
} | |
var oldUiPolicy = 'f6e44e7bdbc005101ad90cd7f4961916'; | |
var newUiPolicy = '05610f08db50c5101ad90cd7f4961937'; | |
var tbl = 'catalog_ui_policy_action'; | |
var tempObj = {}; | |
var grPolicyAction = new GlideRecord(tbl); | |
grPolicyAction.addQuery('ui_policy', oldUiPolicy); | |
grPolicyAction.query(); | |
while (grPolicyAction.next()) { | |
tempObj = {}; | |
new GlideRecordUtil().populateFromGR(tempObj, grPolicyAction); | |
tempObj.ui_policy = newUiPolicy; | |
newGrObject(tbl, tempObj); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment