title: How to set a custom field's value using Keith Palmer's QBO framework?
body: <p>I'm trying to add a value to a custom field using Keith Palmer's QBO PHP framework. I've added the custom field <code>Test Field</code> in the quickbooks settings and now every invoice has a <code>CustomField</code> property with the following properties:</p>
  
  <p><code>DefinitionId</code>,
  <code>Name</code>,
  <code>Type</code></p>
  
  <p>Each of the above types are arrays.</p>
  
  <p>However, I can't seem to set the custom field's value.</p>
  
  <p>The following code doesn't seem to work.</p>
  
  <pre><code>// Add a custom field to the invoice (YOU NEED TO DEFINE THIS IN THE QBO PREFERENCES FIRST!!!)
  $CustomField = new QuickBooks_IPP_Object_CustomField();
  $CustomField-&gt;setName('Test Field');
  $CustomField-&gt;setType('StringType');
  $CustomField-&gt;setStringValue('Test value here');
  $Invoice-&gt;addCustomField($CustomField);
  </code></pre>
  
  <p>UPDATE: </p>
  
  <p>What worked for me was the following:</p>
  
  <pre><code>    $custom_field = new QuickBooks_IPP_Object_CustomField();
      $custom_field-&gt;setDefinitionId('1');
      $custom_field-&gt;setName('Status');
      $custom_field-&gt;setType('StringType');
      $custom_field-&gt;setStringValue('Test value here');
      $invoice-&gt;setCustomField($custom_field);
  </code></pre>
  
  <p>And in my quickbooks account, I had manually set the first custom field to 'Status'.</p>