$RecordRefsIDs = Array('34778', '34782', '34781'); //IDs of transactions to search for
$RecordRefs = Array(); //array to hold IDs of transactions to search for
//fill array of record references with RecordRef objects
for($i = 0; $i < sizeof($RecordRefsIDs); $i++) {
$myResponderRefRecord = new nsRecordRef(array('internalId' => $RecordRefsIDs[$i]));//each ID needs to be presented as RecordRef
}
// SearchMultiSelectCustomField
$aSearchSelectCustomField = new nsComplexObject('SearchMultiSelectField');
$aSearchSelectCustomField->setFields(array( 'searchValue' => $myResponderRefRecord,
'operator' => 'anyOf'));
$transactionsearch = new nsComplexObject('TransactionSearchBasic');
$transactionsearch->setFields( array( 'internalId' => $aSearchSelectCustomField));
$searchResponse = $myNSclient->Search($transactionsearch);
$totalRecords = $searchResponse->totalRecords;
No comments:
Post a Comment