Just to add, this workflow works well in standalone Details and Single Record Update DataPages. If you are using it in the Details page from a Results page, I'm afraid the code won't work. However, as a workaround, you may just need to separate the Results Page and Details page and create an HTML block inside the results page that includes the details page URL with the ID parameter on it to pass the data.