Is it possible to grab the url Netsuite uses for an item image using the PHP Toolkit? Using this function:
function getProduct($id) {
$service = new NetSuiteService();
$service->setSearchPreferences(false, 1000);
$itemInfo = new SearchMultiSelectField();
$itemInfo->operator = "anyOf";
$itemInfo->searchValue = array('internalId' => $id);
$search = new ItemSearchBasic();
$search->internalId = $itemInfo;
$request = new SearchRequest();
$request->searchRecord = $search;
$searchResponse = $service->search($request);
$products = $searchResponse->searchResult->recordList->record;
return $products;
}
I can get the item information. In the information, netsuite gives me this little snippet (the whole thing is truncated for cleanliness):
...
[storeDisplayImage] => RecordRef Object
(
[internalId] => 19876
[externalId] =>
[type] =>
[name] => 4010024.jpg
)
...
This just tells me the name of the file in the Netsuite file cabinet. How do I download that image automatically using the PHP Toolkit?