Hi NetSuiters NetSuite Connector (FarApp) questio...
# integrations
z
Hi NetSuiters NetSuite Connector (FarApp) question Is it possible to have different mappings for each NetSuite item type? For example, if item is a standard inventory item use price and quantity from the standard fields (quantityAvailable), but if item is assembly, then use a custom field for quantity sync
a
This is what #C06V7S5E77Z spit out but don't know if it will help Yes, it is possible to have different mappings for each NetSuite item type. You can achieve this by using SuiteScript, NetSuite's JavaScript-based API. For example, if the item is a standard inventory item, you can use the standard fields for price and quantity (like
quantityAvailable
). 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:
Copy code
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.
z
No, it is solution for CELIGO. I know it is possible there
a
sorry I'm new to NetSuite in general. Good luck!
m
There's probably an under-the-hood setting that can be put in by NS Support. There used to be (WAY back in the day) a tool that you could use to apply logic in semi-SQL-esque formatting. I've had pretty good success with putting in a ticket - hopefully they can help you out too.