The Error: System.InvalidCastException: Specified cast is not valid. at Umbraco.Forms.Data.Storage.RecordStorage.GetRecord(Object id) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\RecordStorage\RecordStorage.cs:line 83 at Umbraco.Forms.Library.GetRecord(String recordId) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\Library\Library.cs:line 72 --------------------------------------------------------------------------------------------------------------------------------------------------------------
So i think the problem is that the 'RecordStorage.GetRecord(Object id)' method only works with a Guid as input. And 'Library.GetRecord(String recordId)' gives it an String.
Can you please fix this? I need this for an project.
Contour Library.GetRecord() Error
Hey guys,
I'm getting an error with the Contour in my xslt file.
Umbraco v 4.5
Contour v 1.0.12
--------------------------------------------------------------------------------------------------------------------------------------------------------------The xslt:
<xsl:variable name="record" select="umbraco.contour:GetRecord('62b8ac58-5b68-40d8-83f8-dc55429bd61a')"/>
The Error:
System.InvalidCastException: Specified cast is not valid.
at Umbraco.Forms.Data.Storage.RecordStorage.GetRecord(Object id) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\RecordStorage\RecordStorage.cs:line 83
at Umbraco.Forms.Library.GetRecord(String recordId) in d:\TeamCity\buildAgent\work\f25907cf379d8816\Umbraco.Forms.Core\Data\Library\Library.cs:line 72
--------------------------------------------------------------------------------------------------------------------------------------------------------------
So i think the problem is that the 'RecordStorage.GetRecord(Object id)' method only works with a Guid as input. And 'Library.GetRecord(String recordId)' gives it an String.
Can you please fix this? I need this for an project.
Have you tried adding curly braces around the GUID? That sometimes helps..
Thanks for your reply, but its not the xslt that dies here. (I did try the curly braces and it also diddnt work, only made more errors).
The function RecordStorage.GetRecord(Object id) from contour is at fault here, It only excepts a Guid. It should also work with an String,
is working on a reply...