I'd like to change a value of field_1
in case the user changed the field_2
. Normally, one does that on the client using JS but in this case, the user might change his mind again, back to the original value. So, I'd like to update a field in a plugin.
I'm successfully discovering the change in field_2
but when I assign a value to field_1
, it doesn't get stored in the database. What do I do wrong?
if (IsField_2Changed())
(Context.InputParameters["Target"] as Entity).Attributes["field_1"] = 666;
I get no crashes, no complaints but the value of 666 (because it's Halloween) does't get stored to the database. The code is executed on the message of update.
Please note that the user doesn't change field_1
. It's going to be set as a read-only field later on.