Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have a umbraco forms resultpage. On the resultpage i try to get the tempdata and then find the recourd with the recordReaderservice.
In most cases it works fine. but in some cases it seems like the recordReaderservice can't find the record.
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource](IEnumerable`1 source)
The recordreaderservice is not opensource? So i can't check what this code do. Maybe it is using search in the background and the index is not updated on time.
down the code:
var recordReaderService = Current.Factory.GetInstance<IRecordReaderService>();
if (TempData["Forms_Current_Record_id"] != null)
var currentRecordId = TempData["Forms_Current_Record_id"];
var listFormIds = (List<Guid>)TempData["UmbracoForms"];
var currentRecord = recordReaderService.GetRecordsFromForm(listFormIds.First(), 1, 1000).Items.Where(r => r.UniqueId == new Guid(currentRecordId.ToString())).First();
Any help would be really appricated
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted