Is it possible to get country from the address in location record in suiteQL, able to get the same in savedSearch and analyticsworkbook.
Having trouble with suiteQL
s
Shai Coleman
04/25/2023, 5:19 PM
I didn't try it, but I'm guessing you need to join with`locationmainaddress`
r
raghav
04/25/2023, 9:27 PM
Yes it took me quite long to realize. Was trying to join address at first among other things.
I'm not sure where is the documentation is for it in Netsuite.
Secondly the locationmainaddress doesn't have id.
They have primary keys was trying to join with
locationmainaddress.id instead of locationmainaddress.nkey.
s
Shai Coleman
04/25/2023, 9:33 PM
You can see it on the Records Catalog page
p
Pablo Schneiter
04/28/2023, 9:06 AM
select entityaddress.country
from location,
entityaddress
where location.mainaddress = entityaddress.nkey
Pablo Schneiter
04/28/2023, 9:06 AM
should work
r
raghav
04/28/2023, 1:37 PM
Yeah was able to build it.
Didn't know the exact table name and about the nkey. Was using id.