title: How to add a value to a lookup field?
body: <p>I have a entitiy "account "in which it has some name_field in Microsoft Dynamics CRM.
  Other than lookup field , every other fields values can be inserted. how to select an existing value in look up????</p>
  
  <p>I used the following code to add value to the lookup field.. However I don't get any error..</p>
  
  <pre><code>Account acc = new Account();
  acc.Attributes["name"] = "Ram"; // this values got inserted
  acc.Attributes["age"] = "22"; // this values got inserted
  acc.Attributes["lookupfieldid"] = "Sampletext";
  
  service.Create(acc); // to create account
  </code></pre>
  
  <p>How I need to change my code in order to select "primary" value in the lookup field?</p>