Name

global.EmailDisplayProcessorUtil

Description

In order to preview the emails targeted to a scoped table, a Restricted Caller Access record needs to be created for EmailDisplayProcessorUtil.

Script

var EmailDisplayProcessorUtil = Class.create();

EmailDisplayProcessorUtil.prototype = {
  initialize: function() {
  },
  
  getParentRecord: function(emailRecord) {
  	var table = emailRecord.target_table;
  	var emailParentRecord = new GlideRecord(table);
  	if (emailParentRecord.get(emailRecord.instance)) {
  		if (emailParentRecord.canRead())
  			return emailParentRecord;
  		else
  			return "No access";
  	}
  	return null;
  },
  
  type: 'EmailDisplayProcessorUtil'
};

Sys ID

d6bde6cb53332300b10bda86a11c08d5

Offical Documentation

Official Docs: