How to Find All legal entities which are having the particular Country/Region?

Hi All,

I am working in AX 2012 R2. Now I have to find all legal entities which are having(belongs to) particular Country code.

Please suggest.

Thanks In Advance

Haribabu

You can check with this method \Classes\SysCountryRegionCode\isLegalEntityInCountryRegion

Thanks for your valuable suggestion(No Pain,No Gain).

And the above method only retrieve true or false if we provide ISO code and Company code.

In my case I have more than 150 country/Region codes like MHL, MCO, ARE…

And I have more than 300 legal entities like SPTP, SHTP,SMRP…

And now what I want to find out is, I know the country/ region code (ex.MHL), and I want to find out the list of legal entities that are having the country/region code MHL.

Please suggest.

Thanks

You can loop through the CompanyInfo records and check with that method to get the list of legal entities related to country ISO code.
(or) look at the \Classes\SysCountryRegionCode\isAnyLegalEntityInCountryRegion, this may help you to write a query to get the list

Thanks Kranthi…

Got it…