Im still understanding Kentico ...
Our product has a custom created CMS Class. In the DB I have noticed a table representative of that Class.
I have API code which I want to insert into that table. What I am noticing is that my insert is missing some fields as I get a MySQL error along the lines of:
Message=Cannot insert the value NULL into column 'Code', table 'FOO.dbo.BAR_DocumentType'; column does not allow nulls. INSERT fails.
Here is the example API code which I also know works for standard inserts:
TreeNode parentProject = tree.SelectSingleNode(siteName, "/Projects/" + projectID, "en-us");
TreeNode newDocument = TreeNode.New("BAR.DocumentType", tree);
newDocument.DocumentName = "XXX99v01";
newDocument.DocumentCulture = "en-us";
newDocument.Insert(parentProject);
I know the code is interfacing with Kentico properly as I can step through the debugger and watch the objects.
Is there something special I need to be doing or configure to be able to do this? How can I set values like 'Code' which 'BAR.DocumentType is looking for?