diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs index a00ee672..05eb995a 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemInsertExt.cs @@ -1025,6 +1025,7 @@ namespace VEPROMS.CSLA.Library { // Insert the enhanced steps. Loop through all enhanced document types, insert from // the paste item's linked step. + ItemInfo newEnh = null; foreach (EnhancedDocument edSource in pasteFromItem.GetMyEnhancedDocuments()) { // create a new enhanced step and link it to this new source step. @@ -1032,13 +1033,13 @@ namespace VEPROMS.CSLA.Library // The ed.Type & ed.itemid show what type of enhanced document (use to create new // config Type). ItemInfo exEnh = ItemInfo.Get(edSource.ItemID); - ItemInfo newEnh = exEnh.InsertEnhancedSteps(tmpCopyStartSourceItem.MyContent.Text, null, addType, MyContent.Type, edSource.Type, this.ItemID); + newEnh = exEnh.InsertEnhancedSteps(tmpCopyStartSourceItem.MyContent.Text, null, addType, MyContent.Type, edSource.Type, this.ItemID); if (newEnh == null) return null; StepConfig sc = new StepConfig(MyContent.Config); sc.AddEnhancedDocument(edSource.Type, newEnh.ItemID); SaveConfig(sc.ToString()); } - return null; + return newEnh; } } // loop through all enhanced document types, pasting in the copied item(s).