Umbraco Forms: Resultpage can't find always a result trough recordReaderService
Hello,
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.
resulting in:
Exception:
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();
}
Umbraco Forms: Resultpage can't find always a result trough recordReaderService
Hello,
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.
resulting in:
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:
Any help would be really appricated
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.