Name

global.RecordHistoryDataGenerator

Description

Generate record history data by invoking GlideHistorySet() with table and sysId of current record.

Script

var RecordHistoryDataGenerator = Class.create();
RecordHistoryDataGenerator.prototype = {
  initialize: function() {
  },

  generateHistoryData: function(tableName, recordSysId){
  	if(gs.nil(tableName) || gs.nil(recordSysId))
  		return null;

  	var hs = new GlideHistorySet(tableName, recordSysId);
  	return hs.generate();
  },

  generateRefreshRequest: function(){
  	return {
  		timestamp : new Date().getTime()
  	};
  },

  type: 'RecordHistoryDataGenerator'
};

Sys ID

b98b791577d92110a8b1f335ae5a9955

Offical Documentation

Official Docs: