Copied to clipboard

Flag this post as spam?

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


  • Mujtaba Habib 1 post 71 karma points
    Sep 28, 2015 @ 17:34
    Mujtaba Habib
    0

    Updating prevalues for a datatype

    I installed this package for umbraco https://our.umbraco.org/projects/backoffice-extensions/chosen-multi-select-menu/

    And I am trying to update the prevalue for the plugin. I see it is stored in the cmsDataTypePreValues tables with column name "values" and the "alias" value is items.

    The prevalue is stored as a json string. In my code I already have the json string created, which I will use to update the current value.

    var tagObj = Services.DataTypeService.GetDataTypeDefinitionById(datatypeId); var tagObjPrevalue = Services.DataTypeService.GetPreValuesByDataTypeId(tagObj.Id);

    I can get the current prevalue through the tagObjPrevalue object.

    How do I set the new json string as the prevalue for the datatype?

    I know once it is set, I can do something like Services.DataTypeService.Save(tagObj);

    and update the datatype

    Any help?

  • Mujtaba Habib 1 post 71 karma points
    Sep 29, 2015 @ 13:12
    Mujtaba Habib
    0

    Anyone?

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies