public static void ApplyActionToAllFinalRenderings(Item item, Func<RenderingDefinition, RenderingActionResult> action)
{
// NOTE: when dealing with layouts its important to get and set the field value with LayoutField.Get/SetFieldValue()
// if you fail to do this you will not process layout deltas correctly and may instead override all fields (breaking full inheritance),
// or attempt to get the layout definition for a delta value, which will result in your wiping the layout details when they get saved.
ApplyActionToAllRenderings(item, FieldIDs.FinalLayoutField, action);
}