Greetings everyone, I'm looking to grab an item p...
# general
k
Greetings everyone, I'm looking to grab an item parent's UPC on an item fulfillment. Currently, I'm trying to pass the item parent ID, but receiving an error that "itemParentId" is not defined. What would be the correct way to grab an item parent's id?
Copy code
var itemParentID = itemFulfillmentRec.getSublistValue({
    sublistId: 'item',
    fieldId: 'parent',
    line: i
})

var itemParentUPC = itemRec.getValue({
    fieldId: itemParentID
})
s
#C29HQS63Gis better for code related questions. Your code does not make sense to me... You are trying to reading a sublist column value (expected return is an internalid of an item) - I don't know that this field even exists on the item fulfillment sublist? And then alternatively trying to read from a field on the item record with some dynamic variable. Fields are not dynamically named. If you already have the item record loaded, then why are you looking at anything on the fulfillment?
k
Thank you @Sandii for your knowledge. I'll review the code and remember to add code related questions to #C29HQS63G.