I know this is a dumb question before asking but f...
# suitescript
p
I know this is a dumb question before asking but first day migrating over to 2.0 and it's had me stumped too long!
Copy code
var itemRecord = r.load({ type: r.Type.itemType, id: itemid, isDynamic: true  });
itemType value is "ASSEMBLY_ITEM" and itemid is a valid assembly item id. The error is "missing a required arguement type". Please put me out of my misery!
e
Remove the
r.Type
itemType
isn't part of the record.Type enumeration
p
Hmm, did try that at points, but gave me an invalid record type of "ASSEMBLY_ITEM"
e
It's
r.Type.ASSEMBLY_ITEM
if you're not setting that elsewhere
p
Alright, must be an issue with me holding the end section in a variable then
e
itemType
should be
assemblyitem
p
ah, Guess I was using a bad source list for my switch! that has sorted it. cheers