title: How get last assigned objectID of collection
body: <p>i have 2 collections one for store agent details like name and agent type..etc,and another one for storing user credentials details like user_name and password</p>
  
  <pre><code>agent_collection{
     _id:''
     NAME:'',
     MAIL:''
  }
  user collection{
  _id:'',
  agent_id:'',
  user_name:'',
  password:''
  }
  </code></pre>
  
  <p>now i want <code>ObjectId</code> of <code>agent_collection</code> in  <code>user_collection</code> as value of <code>agent_id</code> while inserting new record.is there any methods available for getting ObjectId of collection</p>
  
  <p>Thank you</p>