In addition to the GetAttributeAliasValue entity extension method we provide you with another handy method… The cloning of entity records.
This method will enable you to create a perfect clone of any entity record.
Here’s how it’s done!
Entity account = OrganizationService.Retrieve("account", Guid.Parse("6a7cb8d1-7038-ea11-a813-000d3a385a1c"), new ColumnSet(true)); Entity clone= account.Clone(); Guid cloneId = OrganizationService.Create(clone);
This can be used on both early as late bound entity records, as all of your generated classes will inherit from the Entity class!