Manage Learn to apply best practices and optimize your operations.

Display SharePoint data in a Lotus Notes Web application with Ajax

For those organizations using Microsoft SharePoint for document sharing, the ability to display SharePoint list contents in a Notes Web application can cost you. Avoid third-party pricing and use this Ajax code to programmatically connect Lotus Notes with SharePoint lists and libraries.

These days, many companies prefer to use Microsoft SharePoint portal as their document management system. However, when it comes to integrating SharePoint with Lotus Notes/Domino Web applications, Microsoft doesn't provide too many options.

There's third-party software that can be used to connect Lotus Notes with SharePoint, but it will cost you. I recently had a requirement where I needed to display SharePoint list contents in a Lotus Notes Web application. Since my requirement was not on a large scale, I was able to write a program to accomplish this goal. See how easily Lotus Notes can connect to SharePoint lists/libraries programmatically using Ajax.

To accomplish this, let's assume that you're in SharePoint environment where you have sufficient access.

  1. Create a new List/library in SharePoint, and populate it with sample data (Figure 1).

    Note: You can skip this step if you want to integrate an existing list or library.

  2. Create a new List in SharePoint, and populate it.
    Figure 1. Create a new list in SharePoint.

  3. Click on Actions -> View RSS Feed to get the XML of your SharePoint List or Library (Figure 2).
  4. Click on Actions -> View RSS Feed
    Figure 2. Click on Actions -> View RSS Feed.

  5. Now you'll want to capture the URL of your SharePoint list/library because it contains the GUID of the list/library. This is used to identify unique lists/libraries in SharePoint environments. It's also one of the easiest ways to get a GUID. In my example, the GUID is: {C2D471B0-7FFD-453C-9494-56EC7B004630} (Figure 3).
  6. Capture your GUID
    Figure 3. Capture your GUID.

  7. Design your form with a button and a hidden DIV. This button will be used for click event, and the DIV will be used to display SharePoint content (Figure 4).

     Design your form with a button and hidden DIV.
    Figure 4. Design your form with a button and hidden DIV.

    You may notice <<Computed Value>> inside the <span> tag. I always use this tag to display loading status, which makes the Ajax code more interactive. It has the following Formula:

    "<img src=/"+@WebDbName+"/loading.gif"+"/>"

    Note: Loading.gif resides in your current database.

  8. It's now time to create new JavaScript functions in your JS header. Here is the code:

    JavaScript functions for your JS Header
    (Click on code for enlarged view and script download.)

  9. You can now call the readFeed() function by clicking a button. In my example, the button is called "Fetch SharePoint Data."
  10. Now it's time to see our work put into action.

     This is what it looks like after the form loads.
    Figure 5. Here's what you should see when the form loads.

     This is what you'll see when clicking on the button.
    Figure 6. This is what you'll see when clicking the button.

    The data will load after clicking the button .
    Figure 7. After clicking the button, you'll see the data loading.

Note: You may run into a scenario where your Notes/Domino Web application is not running on the same server that SharePoint runs on. In this specific case, you can add document.domain="yourcompany.com" to your JavaScript code or make a change in your server policy file on your SharePoint server (Figure 8).

 Add this in your JavaScript if SharePoint and your Notes application aren't on the same server.
Figure 8. Make this inclusion in your JavaScript code if SharePoint and your Notes Web application aren't on the same server.

Do you have comments on this tip? Let us know.

This tip was submitted to the SearchDomino.com tip library by contributor Rishi Sahi. Please let others know how useful it is via the rating scale below. Do you have a useful Lotus Notes/Domino technical tip or code snippet to share? Submit it to our monthly tip contest, and you could win a prize.

This was last published in November 2009

Dig Deeper on Lotus Notes Domino Interoperability

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchWindowsServer

Search400

  • iSeries tutorials

    Search400.com's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...

SearchDataCenter

SearchExchange

SearchContentManagement

Close