This message was deleted.
# suitescript
s
This message was deleted.
c
probably need to see code but it should just be a record.getSublistValue or record.getCurrentSublistValue depending on what you're doing.
s
Copy code
newRec.getSublistValue({
    sublistId: "item",
    fieldId: "quantityfulfilled",
    line: i
})
that would be helpful wouldn't it haha
But this is coming back undefined/null
c
Also, what sort of script & which entrypoint? Share more code
Keep in mind it has to b on the form in some cases too
s
Ok, I will when I get back to my desk. But it is an aftersubmit on an item fulfillement. It is loading the sales order with record.load
Here is the full data. quantityfulfilled is coming back null/undefined even though it has a value
Copy code
let salesOrd = record.load({
    id: newRec.getValue("createdfrom"),
    type: record.Type.SALES_ORDER
});
const cnt = salesOrd.getLineCount("item");
for (let i = 0; i < cnt; i++) {
    let qtyFulfliled = salesOrd.getSublistValue({
        sublistId: "item",
        fieldId: "quantityfulfilled",
        line: i
    })
}
the netsuite explorer even shows it as having a value
c
I have to ask - Hope you haven't been trying to log the non-typo version of
qtyFulfliled
🙂
s
Nah, I'm using the fieldId of quantityfulfilled
c
You can't delete the question without telling us! Was it scope?
s
Haha sorry! The reason was embarassing so I was hoping it would go away secretly. I had changed code to go from looping through the item fulfillment lines to looping through the sales order lines. Because of that, I was getting the quantityfulfilled from the itemfullfillment instead the sales order 🤦🏼‍♂️
c
Ah :) These things happen!
🙂 1