Created
October 14, 2018 20:30
-
-
Save johncaruso/0fd321bf0061e290b7a1e504ce2c5561 to your computer and use it in GitHub Desktop.
Fixes calculated field values where calculated field values were added/changed after records were inserted
This file contains hidden or 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
| /** | |
| * Fixes calculated field values where calculated field values were added/changed after records were inserted | |
| * | |
| * @param {string} tableName | |
| */ | |
| function fixCalcField(tableName) { | |
| var gr = new GlideRecord(tableName); | |
| gr.query(); | |
| while (gr.next()) { | |
| gr.setForceUpdate(true); | |
| gr.autoSysFields(false); | |
| gr.setWorkflow(false); | |
| gr.update(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment