Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying for an hour now to add a new datatype on ApplicationStartup.
I tride a fiew option and I even browsed the source code and checked DataType/PostSave. When I tried to replicate the procedure I get
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_cmsPropertyType_cmsDataType_nodeId". The conflict occurred in database "umbraco-cms", table "dbo.cmsDataType", column 'nodeId'.
Currently this is my code.
// dt DataType feched from service
if (null == dt)
var df = Mapper.Map<IDataTypeDefinition>(new DataTypeSave()
Action = ContentSaveAction.SaveNew,
ParentId = -1,
Id = 0,
SelectedEditor = "MediaPublish.Versions",
Name = "Media Version",
PreValues = new List<PreValueFieldSave>()
dType.SaveDataTypeAndPreValues(df, new Dictionary<string, PreValue>());
I really need help.
Solved.. I only had to ask.. and I found the solution hidden in plain sight.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted