Created
October 12, 2015 20:00
-
-
Save groggu/3140f2475dce860dffa1 to your computer and use it in GitHub Desktop.
Get an order records from NetSuite
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//assumes you are using the PHPToolKit and have already | |
require_once 'lib/NetSuite/NetSuiteService.php'; | |
$service = new NetSuiteService(); | |
//if you have the internal ID | |
$request = new GetRequest(); | |
$request->baseRef = new RecordRef(); | |
$request->baseRef->internalId = $nsOrderId; | |
$request->baseRef->type = "salesOrder"; | |
$getResponse = $service->get($request); | |
//if you have the Transaction Id | |
$search = new TransactionSearchBasic(); | |
$searchStringField = array('searchValue' => "SO1267816", | |
'operator' => 'is'); | |
$search->tranId=$searchStringField; | |
$request = new SearchRequest(); | |
$request->searchRecord = $search; | |
$searchResponse = $service->search($request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment