Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
Prices
Hello, can somebody help me with a sample code to retrieve the unit price of an item. I'm using the sample code provided by netsuite called webstore but doesn't work, it says "Price not available".
try {
$pricingMatrix = $record->getField('pricingList');
if ( !is_null($pricingMatrix) ) {
$pricesInRange = $pricingMatrix->getPricesFromPriceLevel("5", "1", true);
if ( !is_null($pricesInRange) && count($pricesInRange) != 0 ) {
?>
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<?
foreach( $pricesInRange as $range => $price ) {
if ( $range == "1 and up" ) {
echo $price . " $<br/>";
} else {
?>
<tr>
<td align="center"><?php echo $range; ?></td>
<td align="center"><?php echo "$ " . $price; ?></td>