Discussions

Check out Oracle NetSuite upcoming events and conferences here
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
Update your Profile with your Support type to get your Support Type badge.
Expand your NetSuite knowledge by joining our Ask A Guru Live sessions. RSVP on this event now.
Get ready to take on exciting new challenges and become the next SuiteMaster of the Month!
Join the largest gathering of the NetSuite Community at SuiteWorld in Las Vegas, September 9-12! Discover cutting-edge innovations, attend insightful sessions, network with industry leaders, and elevate your business to new heights. Register here!

Script for neagtive Inventory adjustment

edited May 26, 2021 8:36PM in Ask A Guru 3 comments

Hi All,

I am trying to create an inventory Adjustment using suiteScript 2.1 While trying to set the "adjustqtby" as a negative value. It rejects the input. With the following error please let me know why this error occurs?

Error message "type":"error.SuiteScriptError","name":"INVALID_FLD_VALUE","message":"Value -1.0 outside of valid min/max range for field adjustqtyby"

Script is below

let createInventoryAdjustment = (siteId)=> {

try {

var inventoryAdjustmentRecord = record.create({

type: record.Type.INVENTORY_TRANSFER,

isDynamic: true

});

inventoryAdjustmentRecord.setValue("account",accountId)

let index = 0;

let currentInventoryData = getSerielNumbers(siteId);

let itemVsSerialNo = currentInventoryData.results;

let itemsVsQty = currentInventoryData.itemsVsQty;

for (var key in itemVsSerialNo) {

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!

Leaderboard

Community Whiz

Quarter 3 (Jul-Sep 2024)

This Week's Leaders

This Month's Leaders

All Time Leaders