0

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.

  • Consider adding hyperlinks pointing to the API points you are referring to, and potentially include where *exactly* you are stuck. What have you tried so far? Is there any error message that you cannot get around? The more precise you are, the more likely it is for useful answers. – dennlinger Sep 06 '18 at 06:44

2 Answers2

1

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.

Suite Resources
  • 1,164
  • 8
  • 11
0

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.

Ariel Ruiz
  • 163
  • 2
  • 6