Copied to clipboard

Flag this post as spam?

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


  • Rajeev 126 posts 154 karma points
    Sep 23, 2011 @ 14:19
    Rajeev
    0

    Accessing a record through id

    Hello,

    Is there are any way to access a contour Form Entry using record id using Razor

    Contour.Addons.DynamicObjects.dll.

    In the API I can see, GetRecord(string id) but not able to get that in the Razor Addon Library, please let me know,

     

    -Rajeev

  • John Ligtenberg 53 posts 214 karma points
    Mar 05, 2013 @ 17:43
    John Ligtenberg
    0

    How about this (in Contour 3):

    var recordId = Request["recordid"];

    RecordStorage storage = new RecordStorage();
    Umbraco.Forms.Core.Record record = storage.GetRecord(new Guid(recordId));

    if (record == null)
    {
    return;
    }

    foreach (var r in record.RecordFields)
    {
    @r.Value.Field.Caption
    @r.Value.ValuesAsString()
    }
Please Sign in or register to post replies

Write your reply to:

Draft