Hi @kevinm!
You should be able to do something along these lines to get the value…
@using Umbraco.Forms.Core.Models
@using Umbraco.Forms.Core.Persistence.Dtos
@using Umbraco.Forms.Core.Data.Storage
@using Umbraco.Forms.Core.Services
@inject IFormService _formService
@inject IRecordStorage _recordStorage
@inherits UmbracoViewPage
@{
Guid formId;
Form? form;
Guid recordId;
Record? record;
if (TempData["UmbracoFormSubmitted"] != null)
{
Guid.TryParse(TempData["UmbracoFormSubmitted"]?.ToString(), out formId);
form = _formService.Get(formId);
if (form != null && TempData["Forms_Current_Record_id"] != null)
{
Guid.TryParse(TempData["Forms_Current_Record_id"]?.ToString(), out recordId);
record = _recordStorage.GetRecordByUniqueId(recordId, form);
}
}
}
There may be better ways of null checking than this, but conceptually this is how you should be able to get these records on the success page.