Name
sn_grc_pa.GRCPAIndicatorAjax
Description
General AJAX utilities for GRC PA
Script
var GRCPAIndicatorAjax = Class.create();
GRCPAIndicatorAjax.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
getPaIndicatorRelationId: function() {
var paIndicator = null;
if (this.getParameter('sysparm_type') == 'content')
paIndicator = new GlideRecord("sn_grc_pa_m2m_content_pa_indicator");
else
paIndicator = new GlideRecord("sn_grc_pa_m2m_item_pa_indicator");
if (paIndicator.get(this.getParameter('sysparm_pa_indicator_relation_id'))) {
if (this.getParameter('sysparm_type') == 'content') {
return (new global.JSON()).encode({paIndicator: paIndicator.pa_indicator + '', paBreakdown: '', element: ''});
} else {
return (new global.JSON()).encode({paIndicator: paIndicator.pa_indicator + '', paBreakdown: paIndicator.pa_breakdown + '', element: paIndicator.pa_element + ''});
}
}
return "";
},
refreshScores: function() {
(new GRCPAIndicatorUtils()).refreshScores(this.getParameter('sysparm_sn_grc_item_id'), this.getParameter('sysparm_type'));
},
});
Sys ID
186ce0a9c303120044b2db1122d3aeaf