title: FileMaker PHP API..get ID of newly created record..?
body: <p>I am using the PHP API to insert records in FileMaker.  I also need to insert related data into a separate table, so I need to pull the record ID from the new record that gets created so that I can include that ID in the new record for the related table.</p>
  
  <p>Here is what I'm working with:</p>
  
  <pre><code>$fm =  new FileMaker('PayPal_IPN', FM_HOST, FM_USER, FM_PASS);
  $new_ipn_record = $fm-&gt;createRecord('ipn_transactions', $ipn_record_data);
  $new_ipn_record_result = $new_ipn_record-&gt;commit();
  </code></pre>
  
  <p>That part works as expected and adds the new record into FileMaker.  So now I need to get the ID of the record that was just created.  I tried this...</p>
  
  <pre><code>$new_ipn_record_id = $new_ipn_record_result-&gt;getLastRecord()-&gt;getRecordID();
  </code></pre>
  
  <p>But I end up with an error...</p>
  
  <blockquote>
    <p>Call to a member function getLastRecord() on a non-object</p>
  </blockquote>
  
  <p>Any information on what I'm doing wrong here would be greatly appreciated.  Thanks!</p>