Name

global.HouseholdGlobalAPI

Description

No description available

Script

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

  isAnyHouseholdHeadOrRepresentative: function() {
  	
  	// Check if base extension feature is active
  	if(!gs.tableExists('sn_customer_rel_consumer_to_consumer'))
  		return false;
  	
  	if(new sn_cs_base_ext.AuthorizedRepUtil().isAuthorizedRepresentativeOfAnyConsumer())
  		return true;
  	
  	// Check if household feature is active
  	if(!gs.tableExists('csm_household_member'))
  		return false;

  	if(new sn_csm_household.HouseHoldUtils().isLoggedinUserAnyHouseholdsHead())
  		return true;

  	if(new sn_csm_household.HouseHoldUtils().isAuthorizedRepresentativeOfAnyHouseholdConsumer())
  		return true;

  	return false;
  },
  
  type: 'HouseholdGlobalAPI'
};

Sys ID

f8e86246ff401010c92a41a6793bf1f7

Offical Documentation

Official Docs: