Copied to clipboard

Flag this post as spam?

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


  • Michael Falch Madsen 70 posts 92 karma points
    Dec 12, 2010 @ 16:47
    Michael Falch Madsen
    0

    how to access updateDate property?

    Have trouble accessing the updateDate property in a usercontrol - Response.Write(node.getProperty("updateDate").value.toString()); but gets 

    Object reference not set to an instance of an object

     I can access the other properties of the document. Any ideas?

  • Michael Falch Madsen 70 posts 92 karma points
    Dec 12, 2010 @ 16:57
    Michael Falch Madsen
    0

    Guessing it have to do with the way im accessing the tree

    umbraco.cms.businesslogic.Content[] nodesoftypeproduct = Document.getContentOfContentType(DocumentType.GetByAlias("product"));

    foreach (umbraco.cms.businesslogic.Content node in nodesoftypeproduct)

    {

    }

  • Aaron Powell 1708 posts 3046 karma points c-trib
    Dec 12, 2010 @ 23:22
    Aaron Powell
    0

    Use Document.GetDocumentsOfDocumentType as that'll return a Document collection and a Document object has UpdateDate.

    If you're trying to use this on the front end though you should be using the Node APIs so you don't hit the database

  • Michael Falch Madsen 70 posts 92 karma points
    Dec 13, 2010 @ 07:59
    Michael Falch Madsen
    0

    You absolutely ROCKS! It works like a charm! You the WIKI of this forum and I appreciate it… Thanks a million!!!


    btw. Its for a dashboard usercontrol to email the client when a node is not edited for x periode...

     

     

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies