0

I am working on a client's SharePoint 2010 solution, and I need to do some integration with SharePoint and our ASP.NET MVC Solution. There are two parts of this development: The clients side and our side.

On the Client side: They have a SharePoint list called "SRF Logging" that are linked to a InfoPath form template (.XSN) that generates a InfoPath Form (.XML) to view the specified record in that SharePoint List. With the SharePoint List, they can add a new form and also update existing forms through the list, and that updates the database.

On a daily recurrence, with the help of SSIS, I execute a SQL task to retrieve a list of "SRF's" (Items in the "SRF Logging SP List) and insert that into a XML file, that I transfer to our environment and import into our system, then I update the data I imported with our processes and then export the updated data into a XML. I transfer the XML file back to the client's environment and with the help of SSIS I then update the database records matching the specified ID's.

The whole system works perfectly, but the problem I am experiencing is:

When I update a field with the InfoPath form, the new value gets updated in the Database and the changes reflect on the InfoPath form. However, when I update the database directly, the changes reflect on the list, but not on the InfoPath form.

From my extensive research, I also need to update the Forms library to achieve the updates in InfoPath form. I don't know if I am on the right path but from what I read over multiple blogs, that is the way to do it.

I also discovered this link? and not sure if this will work, and how it works: https://stackoverflow.com/questions/1968809/programatically-edit-infopath-form-fields

I have tried the following solution and nothing is working:

Create a 2nd list and when a new item is inserted to the list, a workflow kicks off that update the "SRF Logging" list - The insert into the list from SharePoint Web UI works, but not from the database side.

Any solution, advise or assistance and an indication of what requirements I will need will be much appreciated.

0

The issue is the way that SharePoint infopath forms work is the data is stored in the infopath xml file itself and any promoted columns will also store the data in form libray (the content database) as column data. So since you are updating the database directly, you are only changing what is shown in the sharepoint column on a view and not what is actually stored in the xml.

Also, you should not be modifying the SharePoint database directly at all. See: http://support.microsoft.com/kb/841057

The code that is in the stack overflow link above looks like it should work. What it is doing is updating the XML file and then saving it back into SharePoint. By doing this SharePoint will copy the value of any promoted columns in the xml file to the SharePoint columns (database).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.