i'm trying to create a new component using the TOM.NET API. i managed to find a block of code which seems to fit with my expectations but i have some questions:
TDSE tdse = new TDSE();
tdse.Impersonate(@"tridion\aramet");
tdse.Initialize();
Component myNewComp = new Component();
myNewComp.Title = "hello";
myNewComp.Schema =
myNewComp.Content =
myNewComp.OrganizationalItem =
myNewComp.Save(true);
- What is the right syntax to set the Schema property (the tcm of my schema )
- Problem with the Content property (is this supposed to be a XDocument ? what about the structure?)
Error 1 'Tridion.ContentManager.Interop.TDS.Component' does not contain a definition for 'Content' and no extension method 'Content' accepting a first argument of type 'Tridion.ContentManager.Interop.TDS.Component' could be found (are you missing a using directive or an assembly reference?) C:\Users\aramet\Documents\Visual Studio 2008\Projects\APITOMNET\APITOMNET\WebForm1.aspx.cs 23 23 APITOMNET
- OrganizationalItem property seems to be used to provide the folder in which i want my component to be saved, what is the right syntax ?