2/21/2025 9:58:41 PM
|
|
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!
Forum to discuss using & developing the legacy SalesLogix Web Client (For versions 7.0 and earlier). View the code of conduct for posting guidelines.
|
|
|
|
Possible to find out which team a user is on?
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 |
|
|
| |
|
Re: Possible to find out which team a user is on?
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 |
|
|
| |
|
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!
|
|
|
|
|
|
|
|