How to copy an object using Clone method

Unofficial Content

Edit your .cs file and add the following using statements:

using Artech.Genexus.Common.Objects.;
using Artech.Architecture.BL.Framework.Services;
using Artech.Architecture.UI.Framework.Services;


//Obtaining the target object, in this case a procedure
Procedure oProc = Procedure.Get(UIServices.KB.CurrentModel, "MyOriginalProc");

//Using the "Clone" method to copy all the information from the procedure
KBObject oProcClone = BLServices.KnowledgeManager.Clone(oProc);
oProcClone.Name = "ProcedureClone";