Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonas Nilsson 137 posts 260 karma points
    Aug 05, 2014 @ 11:33
    Jonas Nilsson
    0

    GetApprovedRecordsFromFormOnPage + Razor

    Hi!

    How can I get a RecordField value when iterating records like this? (Error when accessing this field)

    @foreach (dynamic record in Library.GetApprovedRecordsFromFormOnPage(@CurrentPage.Id, "f0170d32-0c46-4648-a0a4-105ca5c26c0e").OrderBy("Created"))

    {
    @record.Comment
    }

    The example commes from this page:
    http://our.umbraco.org/projects/umbraco-pro/contour/documentation/developer/Working-with-Contour-data-in-Razor/

     

  • Comment author was deleted

    Aug 05, 2014 @ 12:56

    Hey Jonas,

     

    What is the error you are getting?

  • Jonas Nilsson 137 posts 260 karma points
    Aug 05, 2014 @ 13:08
    Jonas Nilsson
    0

    Solved, had mixed up the form id's.

    The example works fine when using the corrent field names...

    /Jonas

  • Comment author was deleted

    Aug 05, 2014 @ 14:02

    Ok glad it's working :)

Please Sign in or register to post replies

Write your reply to:

Draft