Reputation: 11
Im trying to get a VendorPayment object internal id by having its external id. Maybe someone did such a search? the API seems to be very verbose..
help would be appreciated.
Upvotes: 0
Views: 372
Reputation: 179
Making tests about this i get this code, i give to you this example(in PHP) of searching items by internal id maybe helps someone.
$item_id = new RecordRef();
$item_id->internalId = $by_item;
$rec = new SearchMultiSelectField();
$rec->operator = SearchMultiSelectFieldOperator::anyOf;
$rec->searchValue = $item_id;
$itemSearchBasic->internalId = $rec;
$itemSearchBasic = new ItemSearchBasic();
$itemSearchBasic->type = $itemTypeFld;
$itemSearch = new ItemSearch();
$itemSearch->basic = $condition;
$search_field = new ItemSearchAdvanced();
$search_field->criteria = $itemSearch;
$request = new SearchRequest();
$request->searchRecord = $search_field;
And then you use your Netsuite Client to execute the search.
Upvotes: 0
Reputation: 1164
If you have the externalId, you don’t need to do a search. You can use the get operation by creating a RecordRef that references the externalId.
Upvotes: 1