Zoran R-DATAGRAM
09/04/2024, 6:00 PMAdam Weaver
09/04/2024, 6:17 PMquantityAvailable
). However, if the item is an assembly, you can use a custom field for quantity sync.
Here's a basic example of how you might do this:
javascript
var itemType = record.getType();
var quantity;
if (itemType === record.Type.INVENTORY_ITEM) {
quantity = record.getValue('quantityavailable');
} else if (itemType === record.Type.ASSEMBLY_ITEM) {
quantity = record.getValue('custitem_custom_quantity_field');
}
In this example, record
is a NetSuite record object, and custitem_custom_quantity_field
is the ID of your custom field.
Please note that this is a simplified example and you may need to adjust it to fit your specific needs.Zoran R-DATAGRAM
09/04/2024, 6:25 PMAdam Weaver
09/04/2024, 6:26 PMMark C
09/04/2024, 8:56 PM