Hi Everyone. Is there a possibility to commit the ...
# suitescript
n
Hi Everyone. Is there a possibility to commit the order quantity via suitescript?
b
beyond setting the commit quantity column
there is also the unsupported
reallocateitem
record type, which corresponds to Reallocating Items
n
Can we set the commit quantity column? @battk I doubt it but could be wrong.
b
its a normal select field, though of limited utility most of the time since most accounts have it set to available quantity
n
So, you are saying that we can modify the quantity commit column to adjust the committed quantity. Is my understanding correct? On edit sales order as well?
b
sounds like you dont know what the commit column does. Go through Adding Items on a Sales Transaction to see learn what it does
then go experiment with the different values that can be set in that column
n
I am referring to COMMITTED quantity column. I know what it does. Committed quantity is the quantity which is allocated to the sales order and no longer available for the item to be used. My requirement is that we need to modify the commit quantity field on the sales order line based on some criteria so that the quantity can be allocated to other sales order (for the same item)
I believe you are referring to the select field "Commit" column with following options 1. Available Qty 2. Complete Qty 3. Do Not Commit While I am referring to the Quantity Committed (or "COMMITTED") column on the sales order line.
b
correct,
commitquantity
is the script id of the commit column
the other column you are uselessly trying to change,
quantitycommitted
is normally labeled as committed
you will not be able to change the quantity committed via script, just like you cant change it via the ui
you can however change its value via the reallocate items page, though as mentioned before, its not a supported record type so it can change any time and support will not really try to fix it
👍 1
n
I will take a look at this unsupported record type. Thanks for that.
Which script operations can I perform on this record type? Will it allow me to create?
b
mileage varies if you are able to create or not, depends on how good you are at following the ui
👍 1
my tip here is that you will almost certainly be required to use dynamic mode
👍 1
n
Thanks
@battk I found this in the SuiteAnswers: Only user event scripts can be deployed to Reallocate Items. Reallocate Items record cannot be created, loaded or deleted using scripts
Further _"Since Reallocate Items record cannot be created, an error will be returned if one tries to create the record via SuiteScript. - SuiteAnswers 27923: Script Debugger nlapiCreateRecord('reallocateitem') > Error : Cannot call Method 1 from task type 2>_" And I have experienced the same.
b
correct, its explicitly stated that its not supported
so you will have to make the determination if i tell people to do thing i have never done before to use them as guinea pigs, or if i tell people things that i have tried before
n
I tried creating it via script debugger, but it failed. Both standard and dynamic mode.
b
what did your attempt look like
n
var rec = nlapiCreateRecord('reallocateitem');
and I get this error: YOU_CANNOT_CALL_METHOD1_WITH_TASK_TYPE2
OK, it worked for SS 2.0