title: Programmatically find payments to vendor bills
body: <p>I have a vendor bill, let's say <code>#12345</code></p>
  
  <p>It has a bill payment <code>11111</code>, that has <code>X</code> amount applied to it, and bill payment <code>22222</code> that has <code>Y</code> amount applied to it <em>(leading to the bill being paid in full)</em>.</p>
  
  <p>How do I create a webservices query to get back <code>11111</code> and <code>22222</code>?</p>
  
  <p>Right now, in java, I'm doing:</p>
  
  <pre><code>SearchRequest sr = new SearchRequest();
  TransactionSearch ts = new TransactionSearch();
  TransactionSearchBasic tsb = new TransactionSearchBasic();
  
  SearchMultiSelectField smsf = new SearchMultiSelectField();
  smsf.setOperator(SearchMultiSelectFieldOperator.ANY_OF);
  RecordRef rr = new RecordRef();
  rr.setType(RecordType.VENDOR_BILL);
  rr.setInternalId(inv.getNetSuiteID());
  smsf.getSearchValue().add(rr);
  tsb.setAppliedToTransaction(smsf);
  ts.setBasic(tsb);
  sr.setSearchRecord(ts);
  </code></pre>
  
  <p>Which, in plain language, just searches for transactions that have an applied to transaction value of the vendor bill (<code>12345</code>).  But this query returns <code>0</code> records. <em>(Same code, and searching for internal IDs work just fine, so it's the query construction that is at fault here, not the actual operation of the webservices.)</em></p>
  
  <p>What's the actual field I'm supposed to search by?</p>