I have the code below that is working, but it creates a Non-inventory Item for Resale. I need to create a Non-inventory Item for Sale.
I might be missing it and see the NON_INVENTORY_ITEM record type here:
but I don't see anything that looks like it would support Resale.
define(['N/record', 'N/log'], function(record, log) {
function doPost(requestBody) {
try {
// Create a new inventory item record
var itemRecord = record.create({
type: record.Type.NON_INVENTORY_ITEM,
isDynamic: true
});
itemRecord.setValue({
fieldId: 'itemid',
value: itemName
});