Error 5337 submitting InfoPath form to SharePoint - sharepoint

I have some InfoPath 2010 forms with custom code that submits information to SharePoint 2010 form-enabled libraries. One of the forms has a date field, chosen by a picker and stored in a Date/Time column in the library. The form had been working fine for months, but one day it just started failing with the following error:
There has been an error while processing the form.
Click OK to resume filling out the form. You may want to check
your form data for errors.
When I click "show error details", it shows error code 5337 and gives a correlation ID.
When I look up the error in the event log, the details are as follows:
Business logic failed due to an exception. (User: XXX\frank, Form
Name: Miscellaneous Form, IP: , Request:
http://intranet//apps/_layouts/FormServer.aspx
XsnLocation=/FormServerTemplates/Miscellaneous
Form.xsn&Source=/apps/SitePages/expenses.aspx&DefaultItemOpen=1,
Form ID: urn:schemas-microsoft-com:office:infopath:
Miscellaneous-Form:-myXSD-2012-05-14T12-19-23,
Type: FormatException,
Exception Message: String was not recognized as a valid DateTime.)
I am at a complete loss to understand how this problem can have arisen. No aspect of the solution was touched between when it was working and when it stopped. The date format on the InfoPath form is the same as the date format in the SharePoint list column. The system locale and regional settings are consistent everywhere and have not been changed. The problem arose after a slew of Windows updates on the 20th of January, so I'm wondering if one of those might have caused the problem.
The next steps I plan to take are to rebuild and redeploy the form to see if that fixes the problems. However this is code I inherited and it's part of a larger solution, so I'm nervous about redeployment in case I break other things. That's why I wanted to ask here if anyone has come across this or a similar problem before and can to point out something obvious that I might have overlooked.
Thanks for taking the trouble to read this. Any advice would be very much appreciated.

I've faced some issues with InfoPath after Windows and/or SharePoint updates, so you should not rule out that as root cause of the problem. I would check for any known issues using the updates's name.
Regarding the DateTime format, is your custom code setting the DateTime value? If the answer is yes, make sure you are using the following format for the date.
infoPathField.SetValue(dateFieldItem.ToString("yyyy-MM-dd"));
One other thing, can you check the SharePoint LOGS and copy the exception stacktrace?

Related

OData Feed / Power Query in Excel 2016 Not Retrieving All / Duplicating Some Records

In Excel, I successfully connected to an OData feed from Data.Medicare.gov (the website is https://data.medicare.gov/Hospital-Compare/Healthcare-Associated-Infections-Hospital/77hc-ibv8/data and the endpoint is https://data.medicare.gov/api/odata/v4/77hc-ibv8).
However, now that I'm carefully reviewing and analyzing the data, I see that some of the data rows/records on the website (https://data.medicare.gov/Hospital-Compare/Patient-survey-HCAHPS-Hospital/dgck-syfz/data) are missing from my Excel data, while others are duplicated. After refreshing the data in Excel, some of the previously missing rows appear, while others disappear. The rows that appear, disappear, or duplicate with each refresh seem random.
For example, the record with Hospital Name = "Trinitas Regional Medical Center" and Measure ID = "HAI-1-SIR" is on the website but sometimes appears and then reappears from the Excel data table (__id = "row-6s6r~jx5f.wuje") with each refresh. However, the total number of rows does not change and is equal to the downloadable file.
Not sure if this is due to the large number of rows (>170k) in the data set. The only related discussion I have found is on https://blog.crossjoin.co.uk/2018/05/03/troubleshooting-data-refresh-performance-issues-with-odata-data-sources-in-power-bi-and-excel-using-fiddler/ but don't think this tackles my exact issue.
UPDATE 1:
Socrata, who provides the OData Feed service for this site, responded with the following:
[We] have been able to reproduce this behavior in Excel, but I'm not sure what causes it. However, it does not appear to be an issue with the OData feed itself, as I can consistently access that row via my browser (e.g., https://data.medicare.gov/api/odata/v4/77hc-ibv8('row-6s6r~jx5f.wuje')), so it seems to be related to how Excel is handling the data. Unfortunately, I haven't been able to find much online that explains why this is occurring, so it may be best to reach out to Microsoft Support to determine if they are able to assist with this further.
UPDATE 2:
After extensive troubleshooting and discussion with Microsoft's profession technical support, they (incorrectly) concluded the duplicate records were present in the OData feed. Reaching back out to Socrata support, they took into account my observation that this occurs with large data sets only and were able to suggest a resolution to the issue (see answer posted below).
Socrata Support found the issue and suggested appending a $top parameter to the OData feed URL, which resolved the issue for me:
When you load an OData feed in Excel, Excel automatically paginates through the results in the background as it loads in large datasets, and this loading process is resulting in duplicate records. You can work around this by adding a $top parameter to the OData feed URL with a value that is greater than or equal to the total number of rows in the dataset, which will force Excel to load in all the data in a single request rather than paging through the results. For example, if you input https://data.medicare.gov/api/odata/v4/77hc-ibv8?$top=10000000 in as the URL, this will load in all of the records, and there will not be any duplicates.
Microsoft Office 365 Support confirmed "that adding that $top command does indeed seem to stop the duplicates."
UPDATE:
Although the above $top parameter resolved the issue initially, I started getting the following error message in Excel:
Unable to connect
We encountered an error while trying to connect.
Details: "Microsoft.Mashup.Engine1.Library.Resources.HttpResource: Request failed:
OData Version: 3 and 4, Error: The remote server returned an error: (500) Internal Server Error. (An internal error occurred. Please contact Socrata support, referencing diagnostic code epsfgirt9lxlekyt89oq25x54)
OData Version: 4, Error: The remote server returned an error: (500) Internal Server Error. (An internal error occurred. Please contact Socrata support, referencing diagnostic code 58cf025wln5br4qzw6lcrxh3a)
I therefore reached out to Socrata Support and they responded with the following:
[We are] encountering the same error. I checked with our engineering team, and they said that they actually recently made some updates that likely caused this but also should have fixed the underlying issue. So if you remove "?$top=100000" from the OData URL in Excel and just use https://data.medicare.gov/api/odata/v4/yv7e-xc69, that should work and not return duplicate records like you had seen before. I have tested this on a couple of different assets today, and it does indeed seem to be fixed ... .
I used the regular OData endpoint (https://data.medicare.gov/api/odata/v4/yv7e-xc69) and it loaded without duplicates.

SSRS with Report Viewer issues not refreshing

Hi i wonder if anyone can help me, I am absolutely stuck on this one. I will start from the beginning so you understand what I am trying to accomplish.
I have a web page which displays total figures in a grid, below the grid I have a Report Viewer which displays these figures as a line graph via an SSRS report on the server. Recent requirements would like the grid to be filterable, so if they want to see totals for a specific customer or product. While I have this working I would also like the SSRS report within the report viewer to also so the same information.
Now I have this semi working, I have made the necessary changes to the report on the server and this is working correctly, next was to hook that all up with the Report Viewer. I also have this working to a degree. Basically what is happening is if the Async is flase then the report does not refresh even ater telling it to. If I turn Async on it works as expected on my computer with IIS7 however when I upload this to our server with IIS6 after the initial load, when a postback happens or when I try to filter the grid I just get a blank screen. Its like the report is not being displayed.
Any help would be appreciated as I have previously used SSRS with report viewer to get a different report based on option buttons which works, but this does not seem to on the server. Locally it is fine but not where it needs to be.
Give it a try . Set enable 32 bit to true
Below is how you do it from IIS7 manager:
1 Right click on the Application Pool and select “Advanced Settings…” or select the same from the Actions pane after selecting the Application pool.
2 Change the “Enable 32-bit Applications” to True (if you want the application pool to spawn in a 32-bit mode)
3 Click OK.
Ok so I figured it out and while it has taken me a while to get the time to post it on here, I thought I should, just in-case someone else comes across this issue.
So Async ="true" the report is displayed in the report viewer for the first time after any postback occurs I am left with a blank screen. If I turn Async = "false" then I get the report the first time but the report never refreshes. After fiddling for a while it got me thinking if it works the first time then that is all I need and just pass different parameters to the report. So I set Async = "false" and had a look as to how to completely reset the report viewer control. Turns out all I needed was ReportViwerControl.Reset(). This reset the control to its default like almost like we are using it for the first time. Then I apply the report details and parameters and hey presto the report works as expected and the report changes every time a filter is set.
I uploaded this to the server and it is working as expected. Quite why it wouldn't before I am unsure however, i do have to stress that the server is old and has old technology, the reason for IIS6. While our test server and my local copy have the latest technology.
Thank you all very much for your help.

"You must save the changes before you can convert this activity" on Fax entity

As you can probably take out from the title, I have a problem on my CRM environment converting a fax entity to an incident (case), it is as you know an out of the box functionality. When I press the button on the ribbon to convert it to a case, I'm given the following error: "You must save the changes before you can convert this activity". And I have definitely saved everything before I do this.
I do have the latest rollup and it works for the other activity entities except from this one. Is there any chance someone had similar issues? If so could you share how you resolved this. Thanks in advance.
There is likely some code running on the form that updates one or more values on the page automatically. Code like that will cause the form to become "dirty". Which is what triggers the message you are seeing.
One way to solve it, is modify your code to perform a save after it make its changes.

Sharepoint MSS 2007 - Filtering mulitple inputs

I am building a directory tool that will list entries for technical support contacts and listed by its appropriate company. My end goal is to allow end users to be presented with 2 simple inputs, a drop down with the list of companies and a text input to enter the name of the technical team they would like to reach. Sharepoint has made this a nightmare.
Since my server is on MSS 3.0 I decided to use a form webpart where I have added created the 2 input (dropdown and text input). I made the parameters to point to the input and added them to the filters and finally made the webpart connection.
I was able to get as far as making a sucessful filter for the technical team but as soon as I try to filter by client the results are very sporadic and mostly incorrect. I play around with the list filter in Sharepoint designer 2007 tried to group the filters together, tried changing the AND/OR in every possible setting but no luck.
Decided to push it by creating a column named blank that basically had empty values. The idea behind that was to allow end user to leave the technical team input blank and show all entries for the company. I thought somehow it would have maybe solve my sporadic issue but instead made it more complex.
At this point I can probably live without being able to search with blank results but I need to be able to at least filter by company and technical teams. At this point any sort of help is appreciated, been at this for a few weeks and my project is due last week so I am pretty much desperate to solve this problem.
For those that may have a similar problem I have found a work around to this problem. I decided to use the ASP.net User Control and this works much better than the form webpart and provides much better results.
Here a link that I found which help me get me on the track:
http://blogs.msdn.com/b/sharepointdesigner/archive/2007/03/05/asp-net-controls-filter-the-data-view.aspx

getDocument() from a XSPDocument is null randomly

In a production application that I have developed sometimes I get an error saying .getDocument() is null. I have added checks in my code that traps an error if this happens. And the strange thing is that the XSPDocument seams to be OK.
Any other ideas how to debug the cause of this?
========================================================
Edit
The lower parts of the application is a simple database, create an assignment it gets status new
change the status to ongoing thru a button. Add information in text, date and numberfields, no Richtext, no attachments.
The user can switch to another xpage to send this document is an pdf attachment in an email.
The user can save the document as a draft
When they are done the click on an approve button and this button will set the status to approved. Save the document and send it as an pdf to an email adress
The problem ocurrs both on the Save button and on the approve button.
.getDocument from the xsp document is null the xspdocument.getNoteID return an ID
I can do replaceitemvalue on the xsp document.
It never happens on new documents only existing what I have seen
It feels like the comment from David that the backend doc is dropped/recycled
we experienced the same getDocument() problem recently. Finally we found a root cause: two different XPages were loaded simultaneously via iFrames. One of those XPages produced run-time error randomly, in 25% of cases. A sort of conflict in JSF model in context of single session.
solution: viewState="nostate"
not sure if it helps in your case, but this option resolved a lot of problems in our applications. It was introduced in 8.5.3. And it should be especially useful for so called XAgents.
Hard to give a hint without knowing more about everything else, but I remember having seen this as well. Just a few ideas:
Is XSPDocument.getNoteID() pointing to a valid Document if this happens?
Is it maybe pointing to a different doc than what you expected?
Could there be some kind of dynamic change of datasources going on?
Maybe some kind of timeout so that the server all of a sudden forgot who you are (in rare cases this happens to me)?
Lothar/edcom
It would be helpful to have a few more details. I assume that the document has previously been saved and it's not a new note?
You're not trying to put the actual document object inside a scoped variable are you? That would be bad as that would be pretty toxic. Without knowing more I would think this could be the case. The backend document has been garbage collected.

Resources