Copied to clipboard

Flag this post as spam?

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

  • Angelo 103 posts 226 karma points
    Oct 24, 2018 @ 12:37

    Saving prevalues after ContentType Saved


    im triyng to save prevalues on my costum Propertytype after saving some contentType ...something like this :

                dataTypeService = ApplicationContext.Current.Services.DataTypeService;
                dataType = dataTypeService.GetDataTypeDefinitionById([MY_DATATYPE_DEFINITIONID]);
                var PreValues = dataTypeService.GetPreValuesCollectionByDataTypeId(dataType.Id).PreValuesAsDictionary;
                var prevalue = PreValues.Where(c => c.Key == "SampleData").FirstOrDefault();
                prevalue.Value.Value = "0";

    but i was afraid that this didnt work ... and it didnt :( because when i open settings on my Property the flag is still checked ...

    enter image description here

    any ideas of how to do that ?

    thank you


Please Sign in or register to post replies

Write your reply to: