select distinct m.OwnerID, m.FSL_TableCode, m.fspro_userid, m.FirstName, m.LastName, m.email, m.FSL_TableCode + convert( varchar, m.OwnerId ) clientCode, at.attrbTypeCode
from tbl_SEC_AttrbGrpLink agl
inner join tbl_SEC_Attributes a
on a.AttrbID = agl.attrbId
inner join tbl_SEC_AttributeTypes at
on at.attrbTypeId = a.attrbTypeId
inner join tbl_SEC_Groups g
on g.GroupID = agl.groupId
inner join tbl_SEC_MemGrpLink mgl
on mgl.groupId = g.groupId
inner join tbl_FSPro_Members m
on m.fspro_userId = mgl.fspro_userId
and m.OwnerID = a.ownerId
and m.fsl_tablecode = a.fsl_tablecode
and m.StaffMember = 1
and m.loginEnabled = 1
where at.AttrbTypeCode in ( 'SalesPipeline','OperatorManagement','DistributorManagement' )
and mgl.FSPro_UserID not in ( select ttm.teamMemberUserId from tbl_TER_TeamMembers ttm where ttm.ownerId = m.OwnerID and ttm.ownerType = m.FSL_TableCode )
and mgl.FSPro_UserID not in (
select mgl2.fspro_userid
from tbl_SEC_MemGrpLink mgl2
inner join tbl_SEC_Groups g2
on g2.GroupID = mgl2.groupId
inner join tbl_SEC_AttrbGrpLink agl2
on agl2.GroupID = g2.groupId
inner join tbl_SEC_Attributes a2
on a2.attrbId = agl2.AttrbID
inner join tbl_SEC_AttributeTypes at2
on at2.AttrbTypeId = a2.AttrbTypeId
and at2.AttrbTypeCode = 'AllTerritories'
where g2.OwnerID = m.ownerId
and g2.FSL_TableCode = m.fsl_tablecode
)
order by clientCode, m.LastName, m.firstName, at.attrbTypeCode
The following list of users have access to Operator Porfolio, Distributor Portfolio or Opportunity Pipeline but are not associated with any territory and do not have "All Territory Visibility".
| Last Name | First Name | Email | Permissions |
select 'Manufacturer' type, mfr_name companyName, m.email
from tblManufacturers
left join tbl_Fspro_members m
on fspro_userid = fseContactId
where mfr_id =
select 'Broker' type, broker_name companyName, m.email
from tblBrokers
left join tbl_Fspro_members m
on fspro_userid = fseContactId
where broker_id =
|
#htmleditformat( qmd_client.type )#(#ownerId#): #htmleditformat( qmd_client.companyName )#
#htmleditformat( qmd_client.email )#FSE Contact Not Set in Profile Database
|
| #htmleditformat( lastName )# |
#htmleditformat( firstName )# |
#htmleditformat( email )# |
#htmleditformat( attrbTypeCode )#
|