This message was deleted.
# suitescript
s
This message was deleted.
c
For some reason, this approach works in the browser console, but not a suitelet.
Copy code
require(['N/record'], record => {
    let itemFulfillmentRecord = record.load({
        type: record.Type.ITEM_FULFILLMENT,
        id: 12311708        
    })
    itemFulfillmentRecord.setSublistValue({sublistId: 'item', fieldId: 'itemreceive', line: 0, value: false})
    itemFulfillmentRecord.save()
})
a
isDynamic: true
?
c
I'm trying now in dynamic mode, but still not having much luck.
But no, in the suitlet I let isDynamic default to false
I've gotten the suitelet to edit the quantity on a line along with the inventory detail, but am stumped on this bit.
a
I'm not real familiar with item fulfillment ... do you maybe have to manually set the quantityremaining as well? or is that calculated? I'd imagine if quantityremaining == 0 it doesn't make sense for it to not be recieved?
c
Worth a shot
a
and I'm assuming there's no error messages? permissions / runas set on the suitelet script?
c
Most of the time i have to post questions like this, i've done something stupid. I'm gunna stop banging rocks together and take a coffee break and hopefully come back to an a-ha moment.
a
haha fair enough, I think that's true of most of the questions i see posted 😄
c
YUP - if statement was causing script to end early
Thanks for the attempt to help!
👍 1