Saturday, December 23, 2006

Opening Infopath forms in Browser directly from a link

Many people have faced the problem of not been able to open Infopath form in browser in

MOSS 2007 directly from a link to .xsn file other than Form library itself. If the user tries to open an

.xsn file from the form library which is configured to render the form in the browser, the user

gets a open/save dialog box instead of a form being rendered in browser.

This is because the links clicked inside a form library or document library behave differently

than the link to same target clicked on any other page. An Office compatible client like Word 2007,

Excel 2007, InfoPath 2007 is smart enough to detect that the link is opened from Document library and

when it detects such a link click, it automatically opens the document directly from the document library

without showing the open/save dialog box in the browser. If you try to modify the document, the

document will be saved directly to the document library. This behavior of document library is identical

to that of normal Windows folder.

The solution to this problem is to have a link to URL (when the form is rendered in browser) rather

than having link to xsn file itself.

This solution is not suitable if you have a link coming in dynamically for ex. for each form in form library,

there is a link in your custom webpart. However you can easily avoid this problem by writing a simple

code which will incorporate the filename of your form in the URL.

Cannot find Data Connection Library in WSS v3

If you are wondering, when you go to create page in your sharepoint site and cannot see

Data Connection Library option there, most likely, you do not have MOSS 2007 installed.

Data Connection Library is a document library which lets you hold you data connections like

Office Data connection files which hold connection string pointing to your external data.

This feature is only available in MOSS 2007. If you are using WSS v3 only, you are out of luck J

If you have MOSS 2007 installed and still there is no option of creating Data Connection Library, you
are most probably using a team site template. Data connection library is not activated as a feature in team site.

So better solution would be to create site out of Publishing Portal or Collaboration Portal.