Login / Register  search  syndication  about

          Infor CRM Questions & Answers

Your place to get answers to your SalesLogix related questions.

 Home  |   Subscribe via RSS  |   Subscribe via E-mail  |   

How do I determine a SalesLogix User's Team and/or Department?

Question:

 Question:

I am trying to limit access to something by Organizational Department or Team Name. I know that you can access the username (Application.BasicFunctions.SystemInfoFor(UserName)) but how do I get the Organizational Department or Team Name of the user who is currently logged in?
 

 

Answer:

 This is a function created by Ryan Farley to determine the Users Department or Team.

' sGroupType = "T" for team, and "D" for department
Function IsMember(ByVal sUser, ByVal sGroup, ByVal sGroupType)
Dim objRS
 
    If sGroupType = "T" Then sGroupType = "G"
    Set objRS = CreateObject("ADODB.Recordset")
    With objRS
         Set .ActiveConnection = Application.GetNewConnection
         .Open "select accessid from secrights where seccodeid = " & _
                   "(select seccodeid from seccode where (seccodedesc = '" & sGroup & "') " & _
                   "and (seccodetype = '" & sGroupType & "')) and (accessid = '" & sUser & "')"
 
         If Not (.EOF Or .BOF) Then
            IsMember = (.Fields(0).Value & "" = sUser)
         Else
             IsMember = False
         End If
         .Close
    End With
    Set objRS = Nothing
End Function

What's This?
  
Bookmark and Share

About SalesLogix Support

   Your SalesLogix Business Partner for SalesLogix Support.


Related Content
   Limiting the Height of the Infor CRM (Saleslogix) ComboBox Popup
In my last post, I discussed how the Infor CRM (Saleslogix) ComboBox is a Dijit Select form widget. This
Posted on Jan 29, 2015 by Ryan Farley to Ryan Farley's Blog
 
   How to Disable the ComboBox Control in the Infor CRM (Saleslogix) Web Client
There's a problem with the ComboBox control in the Infor CRM (Saleslogix) Web Client. It won't di
Posted on Jan 22, 2015 by Ryan Farley to Ryan Farley's Blog
 
   Problems running Crystal Reports in the Infor CRM (formerly Saleslogix) LAN client
We recently had a client that was using the Crystal RDC object in VBScript within the LAN client to run a
Posted on Jan 20, 2015 by Kris Halsrud to Kris Halsrud's Blog
 
   Infor CRM Summary Report
I had a user ask me what is the best way to figure out database statistics: 1. How many records are in
Posted on Jan 09, 2015 by Dale Richter to Infor CRM Questions & Answers
 
   Index of Posts for Starting with Infor CRM (Saleslogix) Development
The blogs on customerfx.com go all the way back to 2003. There's years and years worth of information
Posted on Dec 30, 2014 by Ryan Farley to Ryan Farley's Blog
 
Comments

No Comments
All contents Copyright © 2015 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register