Make Item Non Returnable

To make the item non returnable via a custom field on the NetSuite, extend the itemKeyMapping and the _isReturnable and update the context returning from the function

Configuration.itemKeyMapping = Configuration.itemKeyMapping || {};
 _.extend(Configuration.itemKeyMapping, {
   _isReturnable: function (item) {
	var type = item.get('itemtype');
	var notReturnable = item.get("custitem_non_returnable");
	return ((type === 'InvtPart' || type === 'NonInvtPart' || type === 'Kit') && !(notReturnable));
	},
});

Leave a comment

Your email address will not be published. Required fields are marked *