hi guys, I posted this question few days ago as we...
# suitescript
k
hi guys, I posted this question few days ago as well and thought I had it fixed but I am still seeing the same error, so posting it again. I am using a MapReduce Script that is used to transform SalesOrder into Item Fulfillment, while running the script, it is not able to create Item Fulfillment for any Sales Order that has Kits/Package on them. The error I get is of the following type:
The kit definition has been changed. Please use the Update Orders Kit Members with Current Kit Members Mass Update in order to fulfill this order.
It can be done via UI but not the script. I basically followed the SuiteAnswer 22846 as well, but I keep on getting the same error. All the components of the kits have enough inventory to be able to fulfill them. The weird thing is the same data with the same script works perfectly fine in sandbox but not in production. Is anyone aware of any configuration that might have impacted this?
b
have you followed the directions and ran the mass update?
k
yup! that didnt help either @battk
b
i say try it specifically on whatever sales order is giving you trouble
if not, you might have to undo whatever change was done to the component
k
I have been trying on only those Sales Order that have Kits and it is still failing. I also checked the components setting, other than upping the inventory there has been no change to it 😕
b
bin/lots/serial numbers?
or i guess anything that requires an inventory detail?
k
hmm that I haven't checked
I am not sure how to check that though
b
do you know what an inventory detail is?
k
my understanding is that it is the record that holds the inventories vendor, total amount per location, on hand and status
b
thats the inventory number
which is related to inventory detail
big difference being that an inventory number is related to an item record
while the inventory detail is related to a transaction, and references an inventory number
the importance here being that an item that didnt require an inventory detail before but does now will cause that error you are getting
k
hmmm that makes sense
is it possible to revert the inventory detail of those items?
b
depends on what feature was enabled that requires inventory details
i believe bin, serial numbers, lot numbers, and inventory status all require inventory details
k
from the time the Sales Order was loaded, there hasn't been any feature enabled, I checked the audit trial
b
i personally would just make a new sales order with the kit item in question and fulfill it
k
thats what I tried too
b
if the new fulfillment has the inventory detail icon, then you have one of those features in your account
k
it does have the inventory detail icon in the item fulfillment record line level
the weird thing is I can create fulfillment for them via UI
b
and save them?
k
yes
the script is also able to select the Kit and update the inventory detail per component
b
you probably want to make sure they had the inventory impacts that they are supposed to have
k
but it throws the above error on save
what do you meant by that?
b
for normal inventory items, when you hit this error
your kit item can commit uncommitted inventory
if you can create in the ui, you may want to compare an old item fulfillment to its new copy and make sure their components fulfilled are the same
and that they have the same inventory detail
you should also be able to tell from the inventory detail which of the features in your account your item is using
k
unfortunately we are in data migration phase and none of the Sales Order with Kits have been transformed via a ascript
we have been doing it manually
b
compare manually
take a look at your inventory before and after the original and copy
k
you mean the original Item fulfillment?
b
you should be making a new sales order that looks like the old one
and compare the item fulfillment created by the old one to the new one
k
this issues started 2 days ago, since then we have loaded many other Sales Order and its happening in those new sales orders as well
b
this probably shouldnt happen to new sales orders unless you are being lazy and using the copy feature
k
lol i am sure I started a new one, but let me try again from scratch
I started from scratch and the same error popped up
b
that sounds extra weird
as is usual before making a support case
i would recommend making a very simple script that fulfills that one particular order and run it in the debugger
k
yeah we have a support case in the highest escalated phase possible for the last 2 days but nothing has been done yet
b
its basically required to make a very simple script that easily reproduces the problem if you want a quick support case
k
I was on a call with one of the reps and tried to do so in the console, but that failed with a different error
so we were getting this error
field.getSublistName is not a function
b
i would not expect an easy fix if you cant make a simple script that reproduces the problem
k
although getSublistName is not used at all
b
i also would recommend at least using a server side script
things that work in the conole may not work in a server side script like a map/reduce
its why i recommended the debugger over the console
k
are you recommending to create a simple M/R script to fulfill IFFs for these kinda order in debugger mode?
b
no
simple code that fulfills one sales order in the script debugger
something simple that you can give to support to reproduce the problem
k
I just created one
does log.debug work in the debugger?
b
yes
actually works better since it shows warnings
k
so I put the code and then hit debug script and the play button right?
b
whats the code
k
Untitled
b
use require instead of define
code in define functions wont run unless something requires it
k
got it
I will work on this more and let you know if I come across anything
thank you for looking into it! @battk I really appreciate it!
b
looks okay, i probably wouldnt bother with the parameters to the save method and the ignoreFieldChange
and potentially create the sales order you fulfill to prove its happening on new sales order
k
yeah but I need to add the code to complete the inventory detail part