Some of you might know that Withhold Tax is a country specific (GB, TH, SA, IE) functionality (except for limited functionality available on AP side out of the box) in AX 2012 like AX2009. In AX 2012, if you have opened up an LE with address associated with specific countries and WHT configuration key is on, you will be able to use WHT both on vendor and customer sides. However, there is a price to pay when you want to use WHT functionality in countries other than what MS has already given the localization for. For example, if you want to use WHT functionality for a customer in Egypt, besides enabling the WHT configuration key, open up an LE with Egypt address, you also need to set CountryRegionCodes property for various EDT, table, form control objects with the country code for Egypt. To enable WHT specific business logic, validations in code, you have to add the specific region code in statements like this:
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoTH, #isoSA, #isoGB, #isoIE, ..)
{
}
Overall, it is really hectic to get the above updated on number of places in the AOT, otherwise you won't be able to leverage the complete WHT functionality in AX 2012.
if (SysCountryRegionCode::isLegalEntityInCountryRegion([#isoTH, #isoSA, #isoGB, #isoIE, ..)
{
}
Overall, it is really hectic to get the above updated on number of places in the AOT, otherwise you won't be able to leverage the complete WHT functionality in AX 2012.