Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Link to personal dasbhoards

  Asked By: Jyoti    Date: Apr 10    Category: Sharepoint    Views: 1124

I want to create a web link or web part that is a link to the current
users personal dashboard, any ideas? So whoever is logging on and clicks on
the link it will take them to their own personal dashboard based on their
logon id.

I don't know if this would work... how would I change this or create a web
part that only goes the link when the user click on it not as soon as the
dashboard page comes up?

Response.redirect ( GetWorkspaceURL() & "/dashboards/" & "LOGON_USER" & "/")

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Ira Knox     Answered On: Apr 10

I did this with our Intra site.
Use this web  part which will create personal  dashboard basis on Login
user. If user  doesn't have dashboard, It will create  one for him. If
there is one, it will link  to there.

Function getContent(xmlndPart)
Dim sContent
' define constants for access to Web Store Folders
Const adModeUnknown = 0
Const adModeRead = 1
Const adModeWrite = 2
Const adModeReadWrite = 3
Const adModeShareDenyRead = 4
Const adModeShareDenyWrite = 8
Const adModeShareExclusive = 12
Const adModeShareDenyNone = 16
Const adCreateOverwrite = 67108864
Const adCreateCollection = 8192

strTitle = Ucase(split(request.servervariables("Logon_user"),"\")(1))

Dim strFolderPath
strFolderPath = GetWorkspaceURL() & "/dashboards/" &
strTitle

If (FileExists(strFolderPath)) Then
Response.redirect(strFolderPath)
Else
Dim strPath
strPath = GetWorkspaceURL()
& "/Portal/resources/dbedit.asp?WSPDB=1"

Dim strFormData
strFormData = "Location=" & GetWorkspaceURL()
& "/Dashboards&WSPDB=1&Title=" & strTitle

Set objReq = Server.CreateObject
("Msxml2.ServerXMLHTTP.3.0")
objReq.open "POST", strPath, false
objReq.setRequestHeader "Content-
Type", "application/x-www-form-urlencoded"
objReq.send strFormData

Dim oFolder
Dim arPermissions
Dim nUsers

set oFolder = CreateObject ("CDO.KnowledgeFolder")
oFolder.DataSource.Open strFolderPath, ,
adModeReadWrite

' Set permissions Inheritance to 0 - i.e. not
inherited from parent folder
oFolder.RolesAreInherited = 0

' Get users who has Author permission
arPermissions = oFolder.Authors
nUsers = UBound(oFolder.Authors)

' Asign only login user has author permission
arPermissions(nUsers) = request.servervariables
("Logon_user")
oFolder.Authors = arPermissions
oFolder.DataSource.Save

set oFolder = Nothing
If (objReq.status < 300) Then
Response.redirect(strFolderPath)
Else
sContent = "Something went wrong"
End if
End If

getContent = sContent
End Function

 
Didn't find what you were looking for? Find more on Link to personal dasbhoards Or get search suggestion and latest updates.




Tagged: