RE: Suitescript Error: Invalid item reference key
Hi, I am trying to use record.setCurrentSublistText as setting an item in a sublist line item and it always give me this kind of error “Invalid item reference key” though the item name that I set is correct and no longer sure why is that error occuring?
You get that error when the record you entered is an extant record, but it’s not a valid selection for some reason. So there’s something invalid about your item selection. E.g. the item is only for purchase and is on a sales transaction, the item is not exposed in the selected subsidiary, etc. I’d recommend pulling up both the item record and the transaction in the UI to poke around and see if you can figure out why it’s not a valid selection.