Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Is there an equivalent to clicking the FileSite Refresh button in code?
MarcelVanKempen
Could you please supply some sample code to show us how to refresh the FileSite view?
Here is our sample code. The two issues are noted in bold.
Private Sub cmdCreateNewFolders_Click()
Dim oDMS As IManDMS
Dim oSession As IManSession
Dim oWorkArea As IManWorkArea
Dim oFolders As IManFolders
Dim oFolderSearchParams As IManFolderSearchParameters
Dim oManStrings As ManStrings
Dim ItemByIndex As Integer
Dim oNrtFolder As NRTFolder
'
' Get a DMS to create a session.
'
Set oDMS = New ManDMS
Set oSession = oDMS.Sessions.Add("D4MT")
'
' Connect
'
oSession.TrustedLogin
'
' We needed a session to create a Work area
'
Set oWorkArea = oSession.WorkArea
Set oManStrings = New ManStrings
oManStrings.Add oSession.Databases.ItemByIndex(1).Name
Set oFolderSearchParams = oDMS.CreateFolderSearchParameters
oFolderSearchParams.Add imFolderName, "Herbert Horatio Bartle Bobton-Trent"
'
' We needed a Work area to be able to search for a folder.
'
Set oFolders = oWorkArea.SearchFolders(oManStrings, oFolderSearchParams)
If oFolders.Count = 0 Then Exit Sub
'
' IManFolder(s) don't have methods to create subfolders but NRTFolders do.
' But NRTFolders don’t have methods to find folders.
‘
OIALib.GetCurrentSessionDetails
'
' We needed an NRTDMS to create an NrtFolder from the IManFolder's id.
'
Set oNrtFolder = OIALib.pNRTDMS.GetObjectByID(oFolders.ItemByIndex(1).ObjectID)
oNrtFolder.CreateSubFolder “First new sub folder”, “First new sub folder”, nrPublic
oNrtFolder.CreateSubFolder “Second new sub folder”, “Second new sub folder”, nrPublic
‘
‘ Neither the IManFolder nor the NRTFolder Refresh method refreshes the FileSite folders.
‘ The created folders do not appear until the user clicks on the FileSite Refresh button.
‘
oNrtFolder.Refresh
oFolders.ItemByIndex(1).Refresh
End Sub
Find more posts tagged with
Comments
guido1
I don't think you can do this by using the low-level IManage API, because it doesn't know anything about integrated applications such as FileSite in Outlook
You can create a custom command however (using the ICommand interface) and pass in some context items which can trigger a refresh in FileSite. Of course, creating a custom command may not suit your requirements
FYI, if you go down the custom command route the 2 context items to add are:
"IManExt.Refresh" - set this to True to cause a refresh, and
"RefreshFolderContents" - set this to True to refresh the document grid