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);
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?
Anyone?
is working on a reply...