Below is a sample code demonstration how you can use C# and SuiteTalk Web Services to retrieve all email and message communication within the specified case.
Sample Code (PHP Toolkit 2012.2 and above)
require_once '../PHPToolkit/NetSuiteService.php';$service = new NetSuiteService();$messageSearch = new MessageSearch();$caseJoin = new SupportCaseSearchBasic();$internalID = new SearchMultiSelectField();$internalID->operator = SearchMultiSelectFieldOperator::anyOf;$internalID->operatorSpecified = true;$sValue[] = new RecordRef();$sValue[0]->internalId = 7;$internalID->searchValue = $sValue;$caseJoin->internalId = $internalID;$messageSearch->caseJoin = $caseJoin;$request = new SearchRequest();$request->searchRecord = $messageSearch;$response = $service->search($request);if ($response->searchResult->status->isSuccess) { var_dump($recordList);} else { $statusDetails = $response->searchResult->status->statusDetail; foreach ($statusDetails as $statusDetail) { echo $statusDetail->type . ": "; echo $statusDetail->message . "
"; echo $statusDetail->code . "
"; }}
No comments:
Post a Comment