I have an item search, where i am looking at this ...
# suitescript
c
I have an item search, where i am looking at this custom field. I want to get the internal ID's of the ID's of the stock category in suitescript. Is this possible, and if yes, how?
b
depends on the field
c
message has been deleted
Going to try this
b
a select type field should give you an interna id
c
It is a select field
b
not enough code shared
what you shared doesnt look like its working with a search result
c
message has been deleted
message has been deleted
b
there is a difference between the value of a search column
and the id of a search column
c
custitem12 is a field that is linked to a dropdown, which points to a list. instead of returning the texts and hardcode the text(strings) into the code. I want the ID's of the list values
b
in the screenshot you shared, the id of the first row is probably 9995
c
message has been deleted
b
your code is trying to treat the id as a function
c
message has been deleted
I want these ID's
is it possible
b
the id isnt a function, and should be throwing errors along those lines
c
Yea i figured, is there another way to get the ID
of the field values
of custitem12
in this search
9995 is the ID of the item record, i want the ID from of the stock category value (aka the custitem12 value ID)
b
for columns representing select fields, Result.getValue returns the internal id of the select option, Result.getText the text of the select option
c
THanks battk! it works, thats the way 😄
c
Please please please change the IDs of the things you're working with. That code is completely unmaintainable.