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)
Creating ShortCuts (Delphi 7)
Duprat
Hello,
What i´m trying to do is add a shortcut to a document that is in a different database of a WorkSpace.
I have created a collection of Documents containing the document that is on the other database. Then i get a Folder of the WorkSpace that i want, get the Folder´s content and use the method AddNewContentShortcut to add the shortcut of the document.
Here is the the code:
vIManSession : IManSession;
vDocument : IManDocument;
vDocuments : IManDocuments;
vShortCuts : IManContentShortcuts;
vShortCutoriginal, vShortCut : IManContentShortcut;
vFolder : IManFolder;
vDataBaseNames : IManStrings;
Content : IManContent;
Contents : IManContents;
.
.
.
...vIManSession.SearchDocuments(vDataBaseNames,vSearchParameters, true, Contents); //here i could get the document that is on the other database
...if assigned(Contents) then
...begin
....Contents.Get_Count(ndocs);
....for x:=1 to ndocs do
....begin
......//add the reference of the doc that is on the same database as the WorkSpace (This is working just fine)
......Contents.ItemByIndex(x,IManContent(vDocument));
......vFolder.Get_Contents(IManContents(vDocuments));
......vDocuments.AddDocumentReference(vDocument,Content);
......if not assigned(Content) then
......begin
........//Add the ShortCut of the doc of the other database
........Contents.ItemByIndex(x, IManContent(vShortCutOriginal));
........vFolder.Get_Contents(IManContents(vShortCuts));
........vShortCuts.AddNewContentShortcut(IManDocument(vShortCutOriginal), vShortCut);
......end;
....end;
...end;
But vShortCut is returning me 'nil' and does not assign the shortcut.
Do you guys have any clue how i can deal with that?
Regards,
Carlos
Find more posts tagged with
Comments
IwovHeather
Hi Carlos,
Someone may answer your question in this Board, but I think you have a better chance of posting your question in the WorkSite forum area.
Thanks,
Heather