Error 5337 when Submitting Data from InfoPath 2007 to a SharePoint List

There might be two reasons:-

1. security issue

In infopath editor, Go to form option, set full trust and create trusted certificate. That should make it work.

2. If you are using RunWithElevatedPrivilages or updating list

This happens mostly when you call SPListItem.Update inside the RunWithElevatedPrivileges block. So you should

•Declare your SPWeb object outside elevated block.
•Get SPWeb object inside elevated block.
•Use & Dispose SPWeb object outside elevated block

SPWeb myWeb = null;
using (SPSite mySite = new SPSite("URL"))
myWeb = mySite.RootWeb;
myWeb.AllowUnSafeUpdates = true;
// using myWeb object access your list item, call update method on SPListItem
myWeb.AllowUnSafeUpdates = false;

Hope it helps.

calendarMarch 9, 2012 · cardInfoyen · commentsNo Comments
tagTags: , , ,  · Posted in: InfoPath 2007, List, MOSS, SharePoint

Leave a Reply

Spam Protection: , required

myworldmaps infoyen