My works setup is weird. For the customer account its setup as a business account and I can easily get the primary email address associated by doing
$service = new NetSuiteService($config);
use NetSuite\Classes\SearchStringField;
use NetSuite\Classes\CustomerSearchBasic;
use NetSuite\Classes\SearchRequest;
$service->setSearchPreferences(true, 1000, false);
$customerSearch = new CustomerSearchBasic;
$customerSearch->createdDate = array(
'operator' => 'after',
'searchValue' => '2019-05-20T00:00:000-08:00',
);
$request = new SearchRequest;
$request->searchRecord = $customerSearch;
$response = $service->search($request);
// echo $count . " records were found.";
$json_data = json_encode($response);
echo $json_data;
My problem is that there are many customers who have multiple contacts within the customer. How can I get those added to the output also for that company/customer.
Thanks!!!
source https://stackoverflow.com/questions/70040067/netsuite-php-how-to-get-all-emails-associated-with-account
No comments:
Post a Comment