title: How to populate related lookup field CRM 2011
body: <p>I want to create an auditing plugin that whenever a "contact" entity is changed, a "historical contact" entity is created that had all the data of the old "contact" entity before the change.</p>
  
  <p>My question is, if I have a lookup field in "contact" to "accounts", how do I get this lookup to the specific "account" and place it in the lookup field for the "historical contact" entity?</p>
  
  <hr>
  
  <p>I completed the plugin, but now there is a new issue.</p>
  
  <p>The "contact" entity can have a blank in the "first name" field.</p>
  
  <p>The "historical contact" entity has "first name" as its primary field, although it is not required.</p>
  
  <p>If there is no "first name" when creating "historical contact" entity it throws an error. I do not know why this is. </p>
  
  <p>Do I need a primary field to create an entity even if the field is labeled to have "no constraint"?</p>