diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 2911bed8..6f0e081f 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -669,8 +669,15 @@ namespace VEPROMS.CSLA.Library ConvertListToDictionary(); string key = itemID.ToString(); if (_CacheByPrimaryKey.ContainsKey(key)) - foreach (ItemInfo item in _CacheByPrimaryKey[key]) + { + // Create a temporary list to process cache entries then use + // the temporary list which may have a side effect on the cache entries, + // thus the need for the temporary list. + List myCache = new List(); + foreach (ItemInfo item in _CacheByPrimaryKey[key]) myCache.Add(item); + foreach (ItemInfo item in myCache) item.OnOrdinalChange(); + } } public bool IsFirstSubStep {