I am working on a SharePoint 2013 on-premises farm. and i have added an ItemUpdated event receiver for my custom list, as follow:-
public override void ItemUpdated(SPItemEventProperties properties)
{
base.ItemUpdated(properties);
var abcd = properties.AfterProperties["OrderInternalStage2"];
var abcd2 = properties.ListItem["OrderInternalStage2"];
now in my case the OrderInternalStage2
is a hidden field inside the content type. And if i check the value using properties.ListItem["OrderInternalStage2"]
the value will be correct, but inside the properties.AfterProperties["OrderInternalStage2"];
the value will always be null??? now if i change the field from being hidden to optional, then the value will be presented inside the properties.AfterProperties["OrderInternalStage2"];
.. so i am not sure what is the reason behind this behavioure, why hidden fields will be null inside the AfterProperties
for the Itemupdated event recevier ??
Thanks