After further research and a little help, I figured out how to search by externalId. Hope this will be useful for someone in the future:
Using php: Create a new GetRequest () object and a new RecordRef () object; set the RecordRef externalId parameter to the required external identifier; set the RecordRef type to "vendor"; set the GetRequest baseRef to the RecordRef that you just created using the NetSuite client, execute the get ( ) passing the GetRequest () object created earlier. The get () method returns GetResponse () containing information about your search (and the object, if one exists).
$getRequest = new \NetSuite\WebServices\GetRequest();
$recordRef = new \NetSuite\WebServices\RecordRef();
$recordRef->externalId = "theExternalIdGoesHere";
$recordRef->type = "vendor";
$getRequest->baseRef = $recordRef;
$response = $client->get($getRequest);
source
share