.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to call a webservice upon opening form from library?

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint


I have infopath forms in sharepoint library. When i open a submitted form, i want to call a webservice, how can i go about to achieve that?

What i have done so far is:

1. set a rule on a certain field

2. call the web service when that field gets populated

3. however, webservice is not called because my web service will output into a log file, but there's no output

View Complete Post

More Related Resource Links

Avoid Opening two instance of Infopath Form which is published to Sharepoint Library


Hi Everyone,

              It would be great if anyone of you answer my question.I have an info path form built in 2007 and published it to share point as a document library.My requirement is i should not allow two instance of the same Form to be opened at the same Time.I mean if you open a form from Share point and If you try to open the next one without closing the previous Form,it should give an alert to user saying that the "Form is already Opened".

I tried like having a Boolean variable which is by default false.If i try to open for the 1st time it should make it as true and for the next time if we refer to that variable and make an alert.But it dint work.Please let me know by anyway i can do this task.Your help will be greatly appreciated!!!!





Issue with opening SharePoint library in Windows Explorer view

I am having trouble opening a document library in Windows Explorer view. The portal is MOSS 2007. I have installed Office 2007 and IE7 on my computer. The error that I get is
"Documents in this folder are not available. The folder may have been moved or deleted, or network problems may be preventing a connection to the server."

Error when opening Infopath Form


Background: Created an Infopath 2003 form with 2 views (1 as Read-Only View and another 1 for Submitting content) and published to a Sharepoint 2007 Library.

Working: When a user opens a new form it opens in submit view; once the form has been submitted, when the user tries to open again, the form opens in read-only view.

Error: 99% of the users do not face any issues, however when the the rest 1% of the users try to open a new form; they receive the following error and are unable to open the form.

Form template: _http://server/sites/subsite/library/forms/template.xsn
InfoPath cannot open the following view: Edit_View
The following view file is not valid: view1.xsl
The file is not a valid XML document.

An invalid character was found in text content.

Line 673, Position 12

I am not sure what is wrong here (or) from where this error is being generated!

Balaji Baskar [Please mark the post as answer if it answers your question]

Switch views when opening a form depending on submit locations?



I would like to know it was possible to switch views when opening a form depending on where the form has been submitted.

I am submitting my form to library A and library B and want to be able to open it in view 1 in library A and in view 2 in library B.

Is there a way to set some url conditions in the open behavior rules?

Thanks a lot!

Check-out issue when opening a document from a document library when a read-only copy is open

We have an issue when a user has a read-only copy of a document from SharePoint open and then tries to check-out and edit another copy of the document (i.e. from the document library) the checked out copy is not connected to the web server. For the user it will look the same they will make edits, save and then close, but when they do so the document is not updated in SharePoint - it may be saved locally in their SP drafts, but the user will think that they have lost their version. We then get the checked out to another user error and you have to discard changes to get the document working again. Steps to reproduce this issue: * click on the name of a office doc on a Document Library * Make sure "Read Only" is selected and click "ok" * Minimize open document * click on the same file on the Document Library * Make sure "check out and edit" is selected and the "Use my local drafts folder" checkbox is ticked. Select OK. * Edit document and press save. Changes are never saved back in SharePoint, they are only on the local draft. We are using MOSS with SP2. Clients are on Office 2003 and 2007 Is this normal behaviour? Is there anything that can be done to prevent this from happening?

Copy the content of one form library to another form library



I have created a form library named "A" where I store all the info-path forms submitted by a certain group of people. In that form library I created a column "status". When the form is submitted the value of status will be "0". Once a person approves this form I am changing the status value to "1". If the value is changed to "1", that form should be copied or transferred to another form library named "B".

How can I implement this logic ? Any help...

Calculated Columns in a Form Library receive error: Value does not fall within the expected range.


I have a forms library that posts the date the form was created. We would like to create a calculated column that allows us to look at these forms based on the month and year they were created. I had created a calculated column that extracts the month and replaces the number with a text string by using an if statement; "IF(MONTH([Proposal Date])=1,"January","") It goes on to evaluate each month and replace the number with the text string. This formula worked for quite some time, though now when I try to add any calculated columns or edit any existing calculated columns on this form library I receive the following error: Value does not fall within the expected range. Now my existing calculated columns (like the one above) do not work and I can not create new calcualted columns. Any insight would be awesome as this has been plaguing me for a couple of months now.

Getting User_Name when opening a form


Hi Everyone:

Scenario on  MOSS with Infopath Form Services:

  1. Two libraries - Library 1 is a list and Library 2 is Infopath form library (browser base form)
  2. A workflow in Library 1 creates a item in Library 2 and pre-populates the form with some data from the list (this works perfectly)
  3. Also a  user can create a form directly in Library 2 (the form library)using the New button
  4. The form has a hidden field which captures UserName() and if User Name = another field in the form, the User can make a change, if it doens't match User can't change the data)


  1. When a user creates a new form in the library, the hidden field is correcty filled in with the logged on User.
  2. If they save, close and open the form, the field still shows logged in user
  3. BUT, if the form is created and saved in the form library by the workflow, and a user then opens the form from Library 2, the Username() blank.
  4. So, one a form is created by the worklflow and a user opens it after the fact, how do I capture the Logged in user who is opening it for the first or subsequent times?

Thanks for your help!


ajax call to webservice

I am new to jquery and want to make a simple jquery ajax call to webservice. My webservice is running fine but I am unable to get the data through ajax and jquery. My code is <%@ Page Language="C#" AutoEventWireup="true" CodeFile="WS.aspx.cs" Inherits="WS" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"><title></title> <script src="jquery-1.4.2.min.js" type="text/javascript"></script> <script  type="text/javascript"> $(document).ready(function() { $("#btGetDate").click(function() { //$("#dvDate").html("I am here"); $.ajax({ type: "POST", url: "WebService.asmx/GetDateTime", contentType: "application/json; charset=utf-8", dataType: "json", success: function(msg) { $("#dvDate").html(msg); } }); }); }); </script> </head> <body> <form id="form1" runat="server"> <div> <div id="dvDate"></div><input id="btGetDate" type="button" value="Get Date" /> </div> </form> </body>  

Infopath Brower enabled form not visible in the sharepoint library after being submitted

Hi, I have created a infopath browser enabled form to submit to a sharepoint form library, however the submitted forms are not visible in the sharepoint link structure.   I'm able to see them in the SPD structure.  I'm using infopath 2007 and MOSS. I actually created a SPD workflow which retrieves specific values from the submitted form and saves it to another sharepoint list. This works fine even if the forms are not visible. Appreciate any help. Thanks

InfoPath Form not showing up in Sharepoint Form Library

I have set up a template form setup that users can fill out and then by pressing the submit button sends an email.My current issue is, when I publish the form to sharepoint, I don't see it, I have sharepoint set to view all documents and I still don't see it.  I can get to the form by clicking the "view my form in browser" pop up after I'm done publishing it.  I would like the users to just be able to click on a link in the library, but I can't find where it was published.Any insight on this would be great thanks.

Views for different group of people in form library

I have created a form library with many fields. And I have created 3 views say X,Y and Z for this form library. I have 3 set of User groups say A,B and C. When a person in group A visits this form library,  the view 'X' should appear. Similarly when a person in group 'B' visits this form library the view 'Y' should appear. How can we achieve this.. Any suggestions...

Remider for Infopath form Library

Hi, How can I get an email when a pickup field change to another status in SharePoint-Infopath Form Library. Can not achieve this from share Point Designer Work flow.   Thanks Irshard

Infopath form and forms library error

I've created an InfoPath 2010 form and associated it with a forms library on a SharePoint site. When I go to the library and choose "Add document" the form opens up to be filled out by the user. When the form is filled out, and the user tries to submit, they get an error saying that I need to configure SharePoint to allow cross-domain data access for user form templates that use connection settings in a data connection file and store a UDC file in the same site collection as the form. So I've enabled cross-domain data access and I've already created a Data Collection Library for Forms in the Site that is approved. What am I missing?  Why am I still getting the error?  

Changing fields while updating an InfoPath Form to a SharePoint 2010 Document library

My document library has following EventReceiver: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <Receivers ListTemplateId="101"> <Receiver> <Name>EventReceiverDocumentLibraryItemUpdating</Name> <Type>ItemUpdating</Type> <Assembly>$SharePoint.Project.AssemblyFullName$</Assembly> <Class>EventHandling.EventReceiverDocumentLibrary</Class> <SequenceNumber>10000</SequenceNumber> </Receiver> </Receivers> </Elements> Updating a browser enabled InfoPath form in the document library fires following event: Public Overrides Sub ItemUpdated(ByVal properties As SPItemEventProperties) Try Me.EventFiringEnabled = False properties.ListItem("Lastname") = "Testperson" properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = True properties.ListItem.SystemUpdate(False) ' solution 1 properties.ListItem.Update() ' solution 2 properties.ListItem.UpdateOverwriteVersion() ' solution 3 properties.ListItem.ParentList.ParentWeb.AllowUnsafeUpdates = False Me.EventFiringEnabled = True MyBase.ItemUpdated(properties) Catch ex As Exception Me.EventFiringEnabled = True E

SP 2010 ASMX Call to Upload Doc to Library

What is the recommended approach to use a web service (Lists?  Copy? ?? ) to add a document to a SharePoint document library from a website OUTSIDE of Sharepoint. I can add a ListItem from XML that provides the fields about the document, but I can't figure out how to attach a document to the List Item.  If it is AddAttachment, then the question is how do I get the DocId to attach it to?  ...and can I do it in one step?

Error opening an Infopath form

I am trying to open an Infopath xsn form and I get the following error - "infopath cannot load this form. Either the signature is corrupted, or the certificate used to sign this form is expired or revoked. Contact the author of the form." I am the author of the form. I tried calling my cellphone number but there was not answer. Anyway, I've encountered this error before and I ended up redoing the form from scratch. I don't want to do that obviously. Is there a way to open the form somehow?Thanks,Dave
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend