Skip to content

Commit 5714355

Browse files
authored
Update 16/umbraco-forms/developer/working-with-data.md
1 parent 35a61b6 commit 5714355

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

16/umbraco-forms/developer/working-with-data.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ Here is a sample code for retrieving a record in a view.
133133
Record? record;
134134
string submittedEmail;
135135

136-
if (TempData["UmbracoFormSubmitted"] != null)
136+
if (Guid.TryParse(TempData["UmbracoFormSubmitted"]?.ToString(), out Guid formId) &&
137+
Guid.TryParse(TempData["Forms_Current_Record_id"]?.ToString(), out Guid recordId))
137138
{
138-
Guid.TryParse(TempData["UmbracoFormSubmitted"]?.ToString(), out formId);
139139

140140
form = _formService.Get(formId);
141141

0 commit comments

Comments
 (0)