<@U01E037GJ84> looks like you can get it via Suite...
# suitescript
m
@Netsuite Tragic looks like you can get it via SuiteQL
n
cheers
m
Prior to SuiteQL I remember only being able to get one of the two ids, can't remember if it was the alpha one or the numerical
1
d
I am not seeing it, but is there any SuiteQL "table" exposed for States as well?
m
@dbarnett unfortunately it doesn't appear to be exposed to SuiteQL. I was able to get the internal ids via the search API, but couldn't figure out how to get any useful columns (tried
name
,
fullname
,
shortname
)
d
hmm maybe it only works in SS2 then
Copy code
srch = search.create({
	type : "state",
	filters : [
		["country","anyof","US"]
	],
	columns : [
		search.createColumn({
			name: "id",
			sort: search.Sort.ASC
		}),
		"fullname",
		"shortname",
		"country",
		"inactive"
	]
});
res = srch.run().getRange(0,1000).map(r => r.getAllValues())
I just didnt realize
search.Type.STATE
was a thing 🤦‍♂️ somehow missed out on that this whole time