Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Saturday, September 28, 2024 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Web Forums - SalesLogix Web Client (Pre-7.2)
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Web Client (Pre-7.2) | New ThreadView:  Search:  
 Author  Thread: Possible to find out which team a user is on?
Steve Knowles
Posts: 657
Top 10 forum poster: 657 posts
 
Possible to find out which team a user is on?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 07 8:51 AM
fiogf49gjkf0d
Is it possible to tell what team(s) a user belongs to from a template or action in the web client? I can't seem to put together what tables this info is coming from.. Thanks
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Possible to find out which team a user is on?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 19 Feb 07 10:25 AM
fiogf49gjkf0d
Here's a post I made a few years ago that has some sample code to check if a user is a member of a specific team. It should be able to get you in the right direction.

http://saleslogixblog.com/rfarley/archive/2003/11/19/227.aspx

-Ryan
[Reply][Quote]
Nick Hollis
Posts: 549
Top 10 forum poster: 549 posts
 
Re: Possible to find out which team a user is on?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 07 3:16 AM
fiogf49gjkf0d
The following code from an action will give you a pipe delimited list of teams the user is in, just include the action on a template, and it will return a string of teams (just call the action within a form option, then you can take the value of that in javascript to work with.) i.e. <input type='hidden' name='userteams' value='<#INCLUDE type=action nameuserteamaction>'>

JScript:

var userteams = document.mainform.userteams.value.split("| ");

(I havent doublechecked the syntax of the above split() but I think its correct....

now user teams is an array of teams that you can loop around to check against to implement your functionality..

Sub Main
Dim strSQL As String
Dim lngHandle As Long
Dim strReturnTeams As String

strSQL = "SELECT distinct SECCODE.SECCODEDESC,"
strSQL = strSQL & "SECRIGHTS.ACCESSID "
strSQL = strSQL & "FROM SECCODE "
strSQL = strSQL & "INNER JOIN SECRIGHTS ON SECCODE.SECCODEID = SECRIGHTS.SECCODEID "
strSQL = strSQL & "WHERE SECRIGHTS.ACCESSID = '" & GetWebInfo("userid") & "'

lngHandle = DBOpenSQL(strSQL, true)

If DBEof(lngHandle) Then
strReturnTeams = ""

Else

strReturnTeams = ""
Do While DBEof(lngHandle) = False
strReturnTeams = strReturnTeams & "| " & DBGetValue(lngHandle, "SECCODEDESC")
DBMoveto lngHandle, "Next"
loop
End If

DBClose lngHandle

setactionresult strReturnTeams


End Sub
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Possible to find out which team a user is on?Your last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 20 Feb 07 9:36 AM
fiogf49gjkf0d
Very nice Nick.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2024 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 9/28/2024 6:23:24 PM