Copied to clipboard

Flag this post as spam?

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


  • Mahmood 28 posts 48 karma points
    Jun 17, 2011 @ 08:40
    Mahmood
    0

    how to get recordId on form submission?

    dear all, 

    i am surprised that i am not getting the answer of a simple question. can some one know how we can get the recrodId which is generated wen we submit contour form. I want to get the record id in xslt.

  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 21, 2011 @ 15:37
    Tim
    1

    Do you mean on the thankyou page, or in a workflow? If you mean the thank you page, its on the querystring (assuming you're redirecting to a thankyou page). For how to get the ID of the current submission in a workflow, have a look at the example code in the contour developer docs here: http://nightly.umbraco.org/Umbraco%20Contour/1.1.8/Developer%20Docs.pdf

    If you give a bit more information about what you're trying to do, I can probably give you more detailed help!

    :)

  • Mahmood 28 posts 48 karma points
    Jun 27, 2011 @ 09:10
    Mahmood
    0

    HI Tim,

    The issue is not looking to be simple as i have tried everything ...

    <xsl:value-of select="umbraco.library:RequestQueryString('recordid')"/>

    above line give me the recordId that is fine, but i want to get the whole record that is recenlty submitted, according to the contour developer guide, we can get it using following syntax

    <xsl:variable name="record" select="umbraco.contour:GetRecord($id)"/

    but wen i set the querystring recordId in id variable and then call the above method, it show the syntax error. it said that it only work if we pas the recordId as string like below.

     <xsl:variable name="record" select="umbraco.contour:GetRecord('e488522f-abe5-4def-9ee1-74f19f9fd33d')" />

     

    now the issue is that we cant hardcod recordId. Plz advice me as m stuck on this issue and not getting help

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 27, 2011 @ 14:27
    Tom Fulton
    0

    To get around the syntax error, you might need to wrap the GetRecord call in an if statement to test if $id is empty in order to save the XSLT - because the parser does some error checking when you save, and probably tries to call GetRecord without a value.  Ex:

    <xsl:variable name="id" select="umbraco.library:RequestQueryString('recordid')" />
    <xsl:if test="$id != ''">
     <xsl:variable name="record" select="umbraco.contour:GetRecord($id)" />
    </xsl:if>

    Hope this helps,
    Tom

     

  • Mahmood 28 posts 48 karma points
    Jun 28, 2011 @ 10:26
    Mahmood
    0

    Tom u rock... i was stuck on this issue. thank alot :)

  • Garrett Fisher 341 posts 496 karma points
    Aug 29, 2012 @ 22:37
    Garrett Fisher
    0

    Anyone know how to access this unique ID in the last part of a workflow?  After "Approval"?  I want to tack some sort of unique id onto the end of a link inside the email I'm sending out.  Either the recordid or a guid.  I'm looking at the XML though and it doesn't look like any such thing is there, although the documentation does imply that you have access to it.  If I wait until the thank you page to send the email that's a whole can of worms because then I am already past the workflow....

    //Garrett

Please Sign in or register to post replies

Write your reply to:

Draft