Name

sn_sd.SDConstants

Description

Contains constants used in Success Dashboard.

Script

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

  // ! - Get the Indicator Level from sn_sd_primary_indicator_registry table based on the i/p
  getIndicatorLevel: function(index) {
      var indicatorLevel = ["overarching", "constituent"];

      return indicatorLevel[index];
  },

  getSuccessMessageUpdate: function(registryName) {
      return gs.getMessage('The formula for calculating KPIs under the "{0}" registry is successfully updated.', [registryName]);
  },
  getWarningMessageUpdate: function(registryName, impactedDenominator) {
      return gs.getMessage('The formula for calculating KPIs under the "{0}" registry is successfully updated. Ensure to update the denominator in the "{1}" KPI.', [registryName, impactedDenominator]);
  },
  getErrorMessage: function(registryName) {
      return gs.getMessage('The formula for calculating KPIs under the "{0}" registry could not be updated.', [registryName]);
  },

  type: 'SDConstants'
};

SDConstants.statusCodes = {
  SUCCESS_CODE_NO_UPDATE: 20001,
  SUCCESS_CODE_UPDATE: 20002,
  WARNING_CODE_NO_UPDATE: 19901,
  WARNING_CODE_UPDATE: 19902,
  ERROR_CODE: 40001
};

SDConstants.messageTypes = {
  INFO: 'info',
  WARNING: 'warning',
  ERROR: 'error'
};

SDConstants.paAggregates = {
  BYMONTHSUM: '1d7a2073eb21020065deac6aa206fe5c',
  BYQUARTERSUM: 'd92f6d00eb31020065deac6aa206fe86',
  BYYEARSUM: '6e4fad00eb31020065deac6aa206fe4e',
  BYMONTHAVG: '587fad00eb31020065deac6aa206fea5',
  BYQUARTERAVG: '3c8fad00eb31020065deac6aa206fe8d',
  BYYEARAVG: '1cafad00eb31020065deac6aa206feb3'
};

Sys ID

ddd1a7d053012110ea79ddeeff7b1229

Offical Documentation

Official Docs: