Name

sn_customerservice.CSMUtil

Description

Util class for customer service management

Script

var CSMUtil = Class.create();
CSMUtil.prototype = {
  initialize: function() {
  },
  
  isCloseUIActionValid: function(current){
  	if(current.state == 3 || current.state == 6 || current.state == 7)
  		return false;
  	if (current.isNewRecord())
  		return false;
  	if(gs.hasRole("sn_esm_agent") || gs.hasRole("sn_csm_ocs.ext_agent") ||  gs.hasRole('sn_esm_location_agent') || gs.hasRole('sn_customerservice.relationship_agent'))
  		return true;
  	if(current.contact == gs.getUserID())
  		return true;
  	if(current.consumer && current.consumer.user == gs.getUserID())
  		return true;
  	
  	return false;
  },

  type: 'CSMUtil'
};

Sys ID

c6e1bea577f72300d7159b71a9106105

Offical Documentation

Official Docs: