Showing posts with label LiveLink. Show all posts
Showing posts with label LiveLink. Show all posts

Monday, January 4, 2010

SharePoint and LiveLink Integration: Part 2

This is a continuation of my previous post on SharePoint and LiveLink integration: Part1 where I described how to archive SharePoint documents to LiiveLink. In this post I will tell you how to search LiveLink data through SharePoint.
Searching Livelink Content from a SharePoint Site
The purpose of this is to create a Search Page in SharePoint site which will be used for searching and displaying search results from Livelink. The following steps will tell us how to do it.



1.  Create a web part page in SharePoint (e.g. LivelilkSearch.aspx)
2.  Create a user control using Visual Studio 2005\2008 which will have a text box (to enter         the query string) a search button(Which will call the Livelink search service and pass the query from text box to get the search results) and a gridview to show the Search Results from Livelink.
3.   In your visual studio project add a web reference to the Livelink Search Service.
4.   Add the code for the OnClick event of the search button to form the proper query string and pass it as a parameter to the ApplyQuery function of the Search service and get the results and show them in the GridView.
                5.    Add this user control as a web part(using SmartPart) on the Search page that we created. 




SharePoint and LiveLink Integration: Part 1

Sometime back i got a requirement for integrating LiveLink with SharePoint. The need was to search Livelink data through SharePoint interface and archive SharePoint documents to LiveLink. So i dicided to integrate the two using Web Services and was able to achieve the requirements successfully. So here is a blog post describing how you can integrate SharePoint 2007 with Livelink ECM.


Integrating SharePoint and Livelink using Web Services.

SharePoint can be integrated with Livelink Server though the Livelink Web Service .This uses standard HTTP protocol to communicate with the Livelink server. Livelink Web Services are installed on a Web Services application server, we do not have to install any Livelink software on the SharePoint Server or on the machine where we are building our applications. The following diagram shows how SharePoint can interact with Livelink through Livelink Web Services.


Archiving SharePoint Documents to Livelink


The purpose of this is to provide an “Archive to Livelink” option for documents stored in SharePoint sites and on click of that button the document will be archived to Livelink. The following steps tell us how to do it.


Step 1: Create a custom feature in SharePoint to add an extra item in the dropdown menu that comes when you click on any document.  Specify the item name as “Archive to Livelink”






Step 2:  Create a web part Page in SharePoint  and Modify the above created feature to Point to this page when we click on the “Archive to Livelink” option






Step 3: Create  a user control in Visual Studio 2005/2008 and add a web reference to the DocMan Web Service of Livelink. Use the ListObjects function of this web service to get the livelink folder structure (to allow users to select the folder in which they want to put the selected document). Then add this user control on the Web part page that we created in the previous step using SmartPart(This is a SharePoint web part which is used to add ASP.NET user controls on SharePoint sites. It is available as a free download on www.codeplex.com)
Note: I am creating user controls instead of web parts because it is easy to design the UI but the same thing can also be done by creating a web part.






Step 4: Create another user control in Visual Studio which uses the AddDocument(if file size is less than 1Mb) or AddDocumentSegmented(If file size is greater than 1Mb) function of the DocMan web service to copy a document to Livelink. The required parameters for the add document function are provided by query string and the above web part that we created. Add this user control to the same webpart page.






Step 5: Create a confirmation page (a web part page in SharePoint) to confirm that your document is archived or not after you click on the Archive button.





So this is one way of Integrating SharePoint with LiveLink using LiveLink  web services. Same thing can be done using LiveLink APIs also.