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'm trying to update a media picker v3 start node. Does anyone know how to do this?
I've got this far:
var curDataType = _dataTypeService.GetDataType("SteveTest"); var curConfiguration = (Umbraco.Cms.Core.PropertyEditors.MediaPicker3Configuration)(curDataType.Configuration); curConfiguration.StartNodeId = Udi.Create(Constants.UdiEntityType.Media, Guid.Parse("cf7caaed6477472f9ef157f808f9a15e")); curDataType.Configuration = curConfiguration;
This gives me: System.ArgumentException: 'Configurations are kinda non-mutable. Do not reassign the same object. (Parameter 'value')'
Hi Steve,
Maybe you can try this :
var curDataType = _dataTypeService.GetDataType("SteveTest"); ((Umbraco.Cms.Core.PropertyEditors.MediaPicker3Configuration)curDataType.Configuration).StartNodeId = Udi.Create(Constants.UdiEntityType.Media, Guid.Parse("cf7caaed6477472f9ef157f808f9a15e"));
Perfect!
Of course - sometimes you just need to really read the error :)
is working on a reply...
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.
Continue discussion
Update datatype configuration programmatically - set StartNodeId
I'm trying to update a media picker v3 start node. Does anyone know how to do this?
I've got this far:
This gives me: System.ArgumentException: 'Configurations are kinda non-mutable. Do not reassign the same object. (Parameter 'value')'
Hi Steve,
Maybe you can try this :
Perfect!
Of course - sometimes you just need to really read the error :)
is working on a reply...
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.