IcontentService.SetValue not changing value of the Property
Hello,
This is Umbraco v10.8+.
I have a nested content list that I wanted to update based on input from the backoffice when someone publishes a node. Essentially, they publish the node, and a Notification event fires off and updates a nested content list somewhere else with information from the new node. Nothing too crazy.
I pull down the existing nested content into a List<Dictionary<string,string>> by parsing it with JsonConvert.DeserializeObj, which works. It then adds another json item to the list that is modeled from the new object that started the Notification event, so the json structure is correct. Once the new object is in the list, it serializes the updated nested content list back into json and then calls IContent.SetValue("propertyName", serializedJson) to update the node.
The problem is, I get no error message, and the value is not updated in the IContent node. If you add a check such as IContent.IsDirty() or IContent.IsPropertyDirty("propertyName") both return false. I am not sure why this is happening, but there are no exceptions to work with so I am a bit lost. Any ideas are welcome, and if I can supply any information I'd be more than happy to.
IcontentService.SetValue not changing value of the Property
Hello,
This is Umbraco v10.8+.
I have a nested content list that I wanted to update based on input from the backoffice when someone publishes a node. Essentially, they publish the node, and a Notification event fires off and updates a nested content list somewhere else with information from the new node. Nothing too crazy.
I pull down the existing nested content into a
List<Dictionary<string,string>>
by parsing it with JsonConvert.DeserializeObj, which works. It then adds another json item to the list that is modeled from the new object that started the Notification event, so the json structure is correct. Once the new object is in the list, it serializes the updated nested content list back into json and then calls IContent.SetValue("propertyName", serializedJson) to update the node.The problem is, I get no error message, and the value is not updated in the IContent node. If you add a check such as IContent.IsDirty() or IContent.IsPropertyDirty("propertyName") both return false. I am not sure why this is happening, but there are no exceptions to work with so I am a bit lost. Any ideas are welcome, and if I can supply any information I'd be more than happy to.
is working on a reply...