Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Look up a SalesOrder with getList & PHP Toolkit
I recently wrote a PHP script utilizing the PHP Toolkit 2008.2.r3 to do a getList request on an array of internal customer ids. I was very happy with how this script works. The script is simple: [PHP]include('login.php');
$idA = array(16779,16681); // array of valid customer internal ids
$recordRefs = array();
for ($i = 0; $i < count($idA); $i++)
{
$custRef = new nsRecordRef();
$custRef->setFields(array('internalId' => $idA[$i],'type' => 'customer'));
$recordRefs[] = $custRef;
}
try
{
$response = $myNSclient->getList($recordRefs);
print_r($response);
}
catch (Exception $e){print_r($e);}[/PHP]
I thought it would be easy to modify to look up sales orders:[PHP]include('login.php');
$idA = array(16779,16681); // array of valid customer internal ids
$recordRefs = array();
for ($i = 0; $i < count($idA); $i++)
{
$custRef = new nsRecordRef();
$custRef->setFields(array('internalId' => $idA[$i],'type' => 'customer'));
$recordRefs[] = $custRef;
}
try
{
$response = $myNSclient->getList($recordRefs);
print_r($response);
}
catch (Exception $e){print_r($e);}[/PHP]
I thought it would be easy to modify to look up sales orders:[PHP]include('login.php');
0