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)
Error with AddNewContentShortcut
pennyg
I'm trying to add a shortcut to a folder using AddNewContentShortcut. This works perfectly if I use the first document in the Worklist however if I try to use the document selected by the user I get the error:
"[DocumentContents][AddNewContentsShortcut] An unrecognised exception has occured.
The document I'm trying to file (oDoc) is an iManDocument which comes from mContext("SelectedNRTDocuments") when the document if selected via a popup menu in filesite.
Basically oDoc comes from
rpSelectedNRTDocuments = mContext("SelectedNRTDocuments")
...various tests in between then
Set oDoc = rpSelectedNRTDocuments(loop1)
The sub below works for the worklist document however if I use the line set ObjProfiledContent = oDoc the error appears.
Private Sub addShortcut(oFolder As IManFolder, oDoc As IManDocument)
Dim oDocShortcut As IManContentShortcut
Dim oShortcuts As IManContentShortcuts
Dim oWorkArea As IManWorkArea
Dim objProfiledContent As IManProfiledContent
Set oWorkArea = oSession.WorkArea
Set oShortcuts = oFolder.Contents
Set objProfiledContent = oDoc
' Set objProfiledContent = oWorkArea.Worklist.ItemByIndex(1)
oShortcuts.AddNewContentShortcut objProfiledContent
End Sub
Any help would be greatly appreciated.
cheers
Find more posts tagged with
Comments
pennyg
FYI I fixed this. The error was due to a session issue.