Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions Fix scripts/FixscriptsForAutoNumberingIssues
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#Fixscript for autonumbering issues
#This script will be run in global using scripts Background

var nm = new NumberManager(tablename);
var gr = new GlideRecord(tablename);
gr.orderBy('sys_created_on');
gr.query();
while (gr.next()) {
gr.number = nm.getNextObjNumberPadded();
gr.update();
5 changes: 5 additions & 0 deletions Specialized Areas/Fix scripts/UpdateMultiple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//Multiple erros Fix scripts
// Navigate to background scripts
// Paste code and update the placeholder variable values, Table name, field name, value etc.
// comment out the gs.InfoMessage after validating row count.
// Run script
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var GrQry = ""; //Query of the affected records.
var grTableName = new GlideRecord('table_name');// update table_name ex. incident
grTableName.addEncodedQuery(GrQry);
grTableName.query();
//gs.addInfoMessage(grTableName.getRowCount())
{
grTableName.setValue("field", "value"); // Replace 'field' and 'value'
grTableName.autoSysFields(false); // Prevents updating system fields like 'updated by'
grTableName.setWorkflow(false); // Prevents triggering workflows
grTableName.updateMultiple();
}
Loading