Hi all - does anyone know why NetSuite might be fa...
# suitescript
y
Hi all - does anyone know why NetSuite might be failing to load the 'createdpo' field of a line item, when you can see the link to the PO appearing in the UI? For some background, I'm trying to transform a Sales Order into an Item Fulfillment, it has 4 items total, 3 out of 4 have already been fulfilled, so I am trying to fulfil the final item. It works in our sandbox account, but in PROD for some reason for this particular order, the field isn't loading anything. The error it is causing is: I cannot save the IF. When you try to transform one record to another (SO -> IF), and you have 3/4 items fulfilled, the line item count is lowered to 1 (as there's just 1 item left to fulfil). This makes sense, however, because it does not have the 'createdpo' link, it is setting 'itemreceive' to false, and so the IF fails because it has NO line items selected.
b
created po is related to special order and drop shipped items
so there needs to be a purchase order involved for those items
y
As in, do you mean it needs to be an SPO, rather than a PO? Or am I misunderstanding?
Sorry if so 🙂
b
i have no idea what a spo is in this context
y
Sorry, as in a special purchase order vs purchase order
b
no real distinction between a special order or regular purchase order
just that the special purchase order is created from a sales order
same for the drop shipped purchase order
y
Gotcha 🙂 thank you! In that case, do you know why trying to load a created PO may not work from a suitescript, when you can see the PO in the UI? For example, I can go to the line item and click on the PO link, and that'll take me there, but running this line here doesn't load it for that same record and item: var createdPo = itemFulfillment.getCurrentSublistValue({ sublistId: 'item', fieldId: 'createdpo', line: i });
b
what does the fulfillment look like when trying to create it from the ui?
y
I haven't tried for this order in PROD, but I tried one in SB and that seemed to work just fine. It picked up the one final item and I could work with it, it even pulled the created PO link in the script
b
you need more information than that
from what you shared, it doesnt sound like you know if the item is being drop shipped, special ordered, or shipped normally
y
This one is being drop shipped, I just didn't know if that was what you mean mattered or not
message has been deleted
b
doesnt matter from the sales order form
its the item fulfillment that you are interested in
y
The item fulfillment is transformed from the Sales Order
b
if its not on the item fulfillment form in the ui, it wont be there in script
if you want to get it from the sales order, then you should be loading the sales order instead
y
It has worked like this for me, for all other records.
Every other time the SO gets transformed into an IF,
You compare the item createdpo against the PO for the items you want to create
In order to dynamically add items to the IF from the SO, that are on the PO
Also, creating the IF on the UI, does what I want it to do, with just the one item included
b
the 2 things you want to do are confirm that the createdpo field is filled in for your item fulfillment
and then check to see if there are any query parameters in the url to see if they are default values that you need to fill in
y
Thank you, let me give that a try and see how it goes