hi, how do u get the internal id of an item from a...
# suitescript
g
hi, how do u get the internal id of an item from a name (the itemid field)
a
You can build a search with one of the filters as itemid. Something like:
Copy code
filters:
    [
        ["itemid","is",YOUR_ITEM_ID]
    ],
g
only way is with a search?
a
I don’t know of a better way really. I assume you want something like a reverse
lookupFields
method, and as far as I am aware there’s nothing like that available as of now. I haven’t touched it but maybe try the
N/query
module?
b
search should be your first choice, though i recommend
nameinternal
over
itemid
.
itemid
uses name related fields like display name too
g
thanks
n
Where is
nameinternal
field? I cannot find it in record browser. @battk
b
message has been deleted
n
Oh, Name (internal) but the ID is itemid for this.
b
the Name {Internal) filter differs from the Name filter in that it only looks at the Item Id field on the item
the regular Name filter also matches fields like Display Name
👍 1