Name

global.VersionControlUtil

Description

Support routine for version control of table records

Script

var VersionControlUtil = Class.create();

VersionControlUtil.prototype = {
  
  // Redirect the updated or saved form to the new record
  redirect : function(tableName, newRecordId) {
  	if (GlideTransaction.get())
  		try {
  			var newRecord = new GlideRecord(tableName);
  			if (newRecord.get(newRecordId))
  				action.setRedirectURL(newRecord);
  		}
  		catch (e) {
  			gs.addInfoMessage(gs.getMessage('Refresh the list by clicking on the breadcrumb link to display the updated record.'));
  		}
  }
}

Sys ID

37e43d7ec3933000c111113e5bba8f43

Offical Documentation

Official Docs: