Q: I’m trying to create an item fulfillment record for an existing sales order record? I keep getting the error "Failed to create, update/transform record because You must have at least one valid line item for this transaction.” error. I’m testing with a hard-coded sales order ID value, so I know it exists. How can I map directly to NetSuite field IDs if my item fulfillment isn’t being created?
A:
1. Make sure that your Celigo integrator.io bundle is updated to bundle ID 20038. If you haven't done this, enable these features and install the bundle.
2. Set up your export to pull in fulfillment data from the 3PL.
3. Set up your import to the “Item Fulfillment” record type.
4. In your import mapping, map the NetSuite Created From (Name) value to be populated by the Transaction ID of your original sales order record. It’s generally something like “"SO123456" or sometimes just numbers, depending on how you have your sales order records set up. If you’re not seeing the NetSuite field ID in the integrator.io mapping drop-down, you can map directly to the NetSuite field IDs.
5. Look at the record in NetSuite and note the fields that are required (these are denoted by asterisks (*). You’ll likely need at least a mapping for the item itself as well as the quantity to be fulfilled. To determine what fields need to be updated/mapped when creating an Item Fulfillment, try manually creating an Item Fulfillment from an existing Sales Order directly in the NetSuite UI. In most cases, you'll only need to update the line-level information for the items that are to be fulfilled. In any case, it's suggested to first try only mapping those fields which are required to successfully transform the record. From there, you can then try adding additional mappings such as line items, package information, tracking information, etc., once the basics are set.
6. If you’re still getting the error, try making a call directly in your browser console using this snippet, where 874788 is the sales order you are checking for. This essentially is an API call that should replicate the same action as clicking the Fulfill button on the order.
nlapiTransformRecord('salesorder', '874788', 'itemfulfillment');
7. If you have the necessary fields mapped, but your Item Fulfillment record still isn’t being created, try mapping the NetSuite “inventorylocation” field in the import field (NetSuite) column. This field isn’t needed in many cases, but may be in yours, so it’s a good thing to check. Click the gear icon next to that field to open the Settings panel, then check the Use this field during record initialization checkbox.
8. If you’re still running into this error, check that it is working in your browser console with:
nlapiTransformRecord('salesorder', '874788', 'itemfulfillment', {‘inventorylocation’: 305)