NOTE: THIS IS AN UNSUPPORTED MEANS OF CUSTOMIZING THE ENTITY. I WILL INVESTIGATE A SUPPORTED SCENARIO AND MODIFY THIS POST.
I have been asked many times, “If I customize this entity can I simply copy the attributes to another entity or do I need to create them from scratch?”. The answer has been “No, there is no feature in CRM to do this. You need to create them again”. So I decided to dig in a bit and figure this out. I came across the following post from CRM MVP Matt Wittemann which discusses copying the attribute portion of the entity. There’s the answer. While a pretty easy solution, it is not as easy as you would expect, unless you know the trick. :) So in this post I will show how to copy all the address attributes from the Account entity to a custom entity.
I have created a custom Partner entity (as seen above) following this process and posted the Partner entity.xml here as an example. Note: The entity .xml contains the form (including OnLoad, OnSave and OnChange events), views, attributes, and relationships. In this Partner example I have included the OnLoad and Country OnChange events to make the hierarchical picklist work. For more details on hierarchical State / Country picklists check out this post.