1 | initial version |
To determine the subtype of an item on the order line in SuiteTalk, you can use the following steps:
Here's some sample code in SuiteTalk (using PHPToolkit) that demonstrates this approach:
$order = $service->get(new RecordRef("salesOrder", $orderId));
$orderLines = $order->itemList->item;
foreach ($orderLines as $line) {
$item = $service->get($line->item);
$itemSubtype = $item->subtype;
// do something with itemSubtype
}
Note that the "subtype" field is only present for certain item types (such as inventory items), so you may need to handle cases where it is not present.