title: Create multiselect lookup in salesforce using apex
body: <p>I want to create a multi-select Contact Lookup.</p>
  
  <p><strong>What i want :</strong> </p>
  
  <p>When user clicks on a lookup then he should be able to select multiple contacts from that.</p>
  
  <p><strong>What i have done:</strong></p>
  
  <p>I have created an object and a field inside that object using both </p>
  
  <p>"<strong>Lookup</strong>" and </p>
  
  <p>"<strong>MasterDetail Relationship</strong>" and</p>
  
  <p>"<strong>Junction Object</strong>"</p>
  
  <p>When i try to use this Field for any input text/Field then it always provides an option to select only one value from lookup but i want to have an option to select multiple.</p>
  
  <p>Even in the Junction object i have created 2 master-detail relationships still lookup allows only one value to be selected.Moreover it makes the field mandatory which i don't want.</p>
  
  <p>Links that i followed:
  <a href="http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC" rel="noreferrer">http://success.salesforce.com/questionDetail?qId=a1X30000000Hl5dEAC</a></p>
  
  <p><a href="https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&amp;section=help&amp;hash=topic-title&amp;target=relationships_manytomany.htm" rel="noreferrer">https://ap1.salesforce.com/help/doc/user_ed.jsp?loc=help&amp;section=help&amp;hash=topic-title&amp;target=relationships_manytomany.htm</a></p>
  
  <p>Can anybody suggest me how to do this.</p>
  
  <p>Its same as we use <strong>Email CC/BCC</strong> under <strong>Send Email</strong> option for any <strong>Lead</strong>.</p>