Name
sn_grc.RelatedListDownstreamEntityFilter
Description
Implements extension point global.RelatedListItemCandidateFilter
Script
var RelatedListDownstreamEntityFilter = Class.create();
RelatedListDownstreamEntityFilter.prototype = {
initialize: function(tableName, parentFieldName, parentRecordSysId, referencedFieldName) {
this.tableName = tableName;
this.parentFieldName = parentFieldName;
this.parentRecordSysId = parentRecordSysId;
this.referencedFieldName = referencedFieldName;
},
getFilterQuery: function() {
var IdsJSON = new sn_grc.GRCAjax().getRelationships(this.parentRecordSysId, 'downstream', 'profile,invalidProfile');
var listIds = JSON.parse(IdsJSON);
var query = "active=true^profile_class.categoryIN" + listIds['profile'] + "^ORprofile_class.category=^sys_idNOT IN" + listIds['invalidProfile'];
return query;
},
handles: function(thing) {
return thing == "DOWN_STREAM_ENTITY_FILTER";
},
type: 'RelatedListDownstreamEntityFilter'
};
Sys ID
824e115753052010bad1ddeeff7b1271