I am using suitetalk toolkit for accessing Netsuite. Already checked the samplecode,it has the code to get a promotion details by its internal Id(using getCustomer.php). I want to get All promotions from netsuite, to achieve this what could be the best way and how can i do that?
Already tried some hacks like through savedsearch, searchresults by giving promotions as the string. None of them led me to success.
Can anyone help me to find the way? i cant see any docs or online page to work with suitetalk operations for my requirement.
Code I have tried to get a Promotion
$service = new NetSuiteService();
$request = new GetRequest();
$request->baseRef = new RecordRef();
$request->baseRef->internalId = "3";//3183723
$request->baseRef->type = "promotionCode";//customer
$getResponse = $service->get($request);
print_r($getResponse);
if (!$getResponse->readResponse->status->isSuccess) {
echo "GET ERROR";
} else {
$promotion = $getResponse->readResponse->record;
echo "Name :".$promotion->name."\n";
echo "Start Date :".$promotion->startDate."\n";
echo "End Date :".$promotion->endDate."\n";
echo "Description :".$promotion->description."\n";
echo "Rate :".$promotion->rate."\n";
}