Copied to clipboard

Flag this post as spam?

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


  • greengiant83 88 posts 109 karma points
    Feb 17, 2011 @ 21:50
    greengiant83
    0

    How to create a new document and populate properties

    I would like to programmatically create a new document of a given document type. I saw this article in the wiki

    http://our.umbraco.org/wiki/reference/api-cheatsheet/creating-a-document

    that outlines out how to create a new document and publish it.  My problem is that I need to set the custom properties of the document.

     

    For example I have a custom document type called Fundraiser which has a custom numeric property of GoalAmount.  I want to create a new one and set that GoalAmount from my code.

  • Jan Skovgaard 11258 posts 23500 karma points MVP 7x admin c-trib
    Feb 17, 2011 @ 21:54
    Jan Skovgaard
    1

    Hi greengiant83

    I think you should have a look at this entry - it shows how you can modify a document through the API, which is what you're after, right? :-)

    http://our.umbraco.org/wiki/reference/api-cheatsheet/modifying-document-properties

    Hope this helps.

    /Jan

  • greengiant83 88 posts 109 karma points
    Feb 17, 2011 @ 21:57
    greengiant83
    0

    That works.  Thanks Jan

  • 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