Name
sn_ex_emp_fd.FoundationNotificationUtilSNC
Description
WARNING Customers should NOT modify this script The purpose of this script include is to provide default behaviours for the FoundationNotificationUtil script include. To change the behaviour of these methods (or add new methods), Customers should override/add new methods to the FoundationNotificationUtil script include.
Script
var FoundationNotificationUtilSNC = Class.create();
FoundationNotificationUtilSNC.prototype = {
initialize: function() {},
getPortalSuffix: function() {
var portalSysId = this.getPortalSysIdFromSysProperties();
var portalRecord = this.getPortalRecord(portalSysId);
if (!portalRecord) {
var escPortalSysId = '70cd9f3b734b13001fdae9c54cf6a72f';
portalRecord = this.getPortalRecord(escPortalSysId);
}
return portalRecord.url_suffix;
},
getPortalRecord: function(portalSysId) {
var spPortalGr = new GlideRecord('sp_portal');
spPortalGr.addQuery('sys_id', portalSysId);
spPortalGr.query();
if (spPortalGr.next()) {
return spPortalGr;
}
},
getPortalSysIdFromSysProperties: function() {
var sysPropertiesGr = new GlideRecord('sys_properties');
sysPropertiesGr.addQuery('name', 'sn_ex_emp_fd.ex.email.redirection.portal.sysId');
sysPropertiesGr.addActiveQuery();
sysPropertiesGr.query();
if (sysPropertiesGr.next()) {
return sysPropertiesGr.value;
}
},
type: 'FoundationNotificationUtilSNC'
};
Sys ID
db0e43a999433010f8779f9ae97cde4d