I want to make a
item:saving pipeline processor that will perform some operations when a item field is reset. I thought this would be simple, but it turned out to be trickier than I thought. Maybe I'm just missing something.
item:saving processor is triggered, I can get the modified fields by
savingItem.Fields.Where(f => f.IsModified). I found that, when resetting a field, the fields
Value is an empty string,
I expected the opposite (
Value to be
HasValue to be
true) during the
item:saving, but the reset operation is eventually performed properly.
How do I distinguish a field reset from storing an empty string in the
item:saving pipeline? (This is on Sitecore 9.0.1)