Is there any way to get State Internal ID by its n...
# suitescript
l
Is there any way to get State Internal ID by its name? Like: Internal ID: 1010 Name: Alabama AL
r
Not sure if the native state field has an internal id. When I use getValue, I get the two letter state code, getText give the full state name
l
When I create a custom field that use State, when I getValue it returns it internal id, got it?
r
Yes but you can't use that internal id to set a value in the native state field you can only use that to use in setting your custom state field. If you want to get the name use getText.
If you want to set your custom field and you only can use setText, if you only have the name value.
l
Yes, thats true, I can get and set the field with the name value
But in my case, I have a custom record with this custom field and I need to search this record by the state value, got it?
r
you should be able to use that field as a filter when you create a search for the custom record
l
Thats the problem 😞
I can perform the search only with internal id
I'm had to create another custom record to map id/value and that sucks
r
Can you know me what you have tried so far, code.
l
I'll try to show you
but probably I can't show you today
tomorrow we can figure it out XD
r
Sure, I am available around this time
You can also send me a direct message
l
Thats nice man!