I keep getting “INVALID_FLD_VALUE” during Inventory Assignment for Inventory Transfer in NETSUITE

Hopefully someone can help me with this error, i followed all the step to do Inventory Detail. This is the error i get, I’m trying to create a inventory detail for inventory transfer but it throws me an error. this is to transfer from a bin location to a non-bin location

{
   type: "error.SuiteScriptError",
   name: "INVALID_FLD_VALUE",
   message: "You have entered an Invalid Field Value 1449 for the following field: binnumber"
}

I have tried every solution i can find on the internet but i still get “INVALID_FLD_VALUE”, below is one the solution I’ve used. I’ve tried using isDynamic = true, but i still got the same error. I’ve checked the binnumber and i can do manual Inventory Transfer and it seems that the binnumber is correct but every time i tried to run this script it always display “INVALID_FLD_VALUE”. The binnumber has a select type is there something else i need to do?

var inventoryTransfer = RECORDMODULE.create({
            type: RECORDMODULE.Type.INVENTORY_TRANSFER,
            isDynamic: true,
            defaultValues: null
        });

        inventoryTransfer.setValue({
            fieldId: "location",
            value: fromlocation,
        });
        inventoryTransfer.setValue({
            fieldId: "transferlocation",
            value: tolocation,
        });
        inventoryTransfer.setValue({
            fieldId: "trandate",
            value: new Date(),
        });
        inventoryTransfer.setValue({
            fieldId: "memo",
            value: 'test IT'
        });
        inventoryTransfer.setValue({
            fieldId: "custbody6",
            value: presta_order_id
        });

        // Loop through each item and add it to the inventory transfer
        processItems.forEach(function (item, key) {
            log.debug('item', item);
            if (item.id) {

                inventoryTransfer.selectNewLine({
                    sublistId: "inventory",
                });
                inventoryTransfer.setCurrentSublistValue({
                    sublistId: "inventory",
                    fieldId: "item",
                    value: item.id
                });
                inventoryTransfer.setCurrentSublistValue({
                    sublistId: "inventory",
                    fieldId: "adjustqtyby",
                    value: item.quantity
                });
                inventoryTransfer.setCurrentSublistValue({
                    sublistId: "inventory",
                    fieldId: "quantityonhand",
                    value: itemDetails.data[0].values.quantityonhand
                });
                // Create inventory detail (assignments)
                var inventoryDetail = RECORDMODULE.create({
                    type: RECORDMODULE.Type.INVENTORY_DETAIL,
                });
                var lineCount = inventoryDetail.getLineCount({ sublistId: 'inventoryassignment' });

                log.debug('line count', lineCount);

                inventoryDetail.insertLine({
                    sublistId: 'inventoryassignment',
                    line: 0
                });

                inventoryDetail.setSublistValue({
                    sublistId: 'inventoryassignment',
                    fieldId: 'binnumber',
                    value: binId, // Replace with actual bin internal ID
                    line: 0
                });

                inventoryDetail.setSublistValue({
                    sublistId: 'inventoryassignment',
                    fieldId: 'quantityavailable',
                    value: itemDetails.data[0].values.quantityonhand, // Ensure this matches the transferred quantity
                    line: 0
                });
                inventoryDetail.setSublistValue({
                    sublistId: 'inventoryassignment',
                    fieldId: 'quantity',
                    value: item.quantity, // Ensure this matches the transferred quantity
                    line: 0
                });

                log.debug('inventoryDetail',inventoryDetail);
                // // Commit the inventory assignment line
                inventoryDetail.save({
                    sublistId: 'inventoryassignment'
                });
            }
        });
        // Commit the line for the item
        inventoryTransfer.commitLine({
            sublistId: 'inventory'
        });

New contributor

Hazree Mahmood is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

You would not generally create the inventory detail subrecord.

var inventoryDetail = inventoryTransfer.getCurrentSublistSubrecord({
    sublistId: 'inventory',
    fieldId: 'inventorydetail'
});

// You probably should be using dynamic calls on the inventoryDetail sub record

// If you are have a from bin number then you likely need a to bin number:
inventoryDetail.setCurrentSublistValue({
  sublistId: 'inventoryassignment',
  fieldId: 'binnumber',
  value: binId, // a valid bin internal id at the 'from' location
});

inventoryDetail.setCurrentSublistValue({
  sublistId: 'inventoryassignment',
  fieldId: 'tobinnumber',
  value: toBinId, // a valid bin internal id at the 'to' location
});

Another note is that I personally try to use non-dynamic mode for transfer order scripting. The code tends to be much cleaner.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật