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.
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.
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
That works. Thanks Jan
is working on a reply...