Когда я пытаюсь добавить CustomerSalesTeam в Customer в netsuite через мой PHP-код. это дает мне ошибку
Неустранимая ошибка: необработанное исключение SoapFault: [soapenv:Server.userException] org.xml.sax.SAXException: salesTeam на {urn:relationships_2013_1.lists.webservices.netsuite.com}CustomerSalesTeamList должен иметь тип {urn:relationships_2013_1.lists.webservices .netsuite.com}CustomerSalesTeam в C:\wamp\www\ns\PHPToolkit\NSPHPClient.php:287 Трассировка стека: #0 C:\wamp\www\ns\PHPToolkit\NSPHPClient.php(287): SoapClient->__soapCall ('добавить', Array, NULL, Array) #1 C:\wamp\www\ns\PHPToolkit\NetSuiteService.php(118604): NSPHPClient->makeSoapCall('add', Object(AddRequest)) #2 C:\ wamp\www\ns\samples\add_customer.php(38): NetSuiteService->add(Object(AddRequest)) #3 {main} добавлено в C:\wamp\www\ns\PHPToolkit\NSPHPClient.php в строке 287
And my Customer adding Code is :
require_once '../PHPToolkit/NetSuiteService.php';
$service = new NetSuiteService();
$customer = new Customer();
$customer->lastName = "sale";
$customer->firstName = "rep";
$customer->companyName = "sale rep testing";
$customer->phone = "123456789";
$cst=new CustomerSalesTeam();
//$c=new CustomerSalesTeam();
//$em=new RecordRef();
//$em->internalId='1333083';
//$cst->employee=$em;
$cst->employee->internalId="1372";
$cst->salesRole->internalId="1";
$cst->isPrimary=true;
$cst->contribution=10.4;
$cstl=new CustomerSalesTeamList();
$cstl->replaceAll=true;
//$cstl->salesTeam[]=$cst;
$cstl->salesTeam =array($cst);
//$cstl->salesTeam=$cst;
$customer->salesTeamList=$cstl;
//$salesRep=new RecordRef();
//$salesRep->internalId='2792';
//$customer->salesRep=$salesRep;
$request = new AddRequest();
$request->record = $customer;
//$service->update($arg)
$addResponse = $service->add($request);
if (!$addResponse->writeResponse->status->isSuccess) {
echo "ADD ERROR";
print_r($addResponse->writeResponse);
} else {
echo "ADD SUCCESS, id " . $addResponse->writeResponse->baseRef->internalId;
}