Add the following to SysCountryRegionCode::isLegalEntityInCountryRegion
Idea by Kim Steffensen (Microsoft Escalation engineer)
public static boolean isLegalEntityInCountryRegion(container _isoCountryCodes, selectableDataArea _selectableDataArea = curext())
{
#Define.DEBUG_ALL(true) //set true to get infolog for every country evaluated
#Define.DEBUG_SINGLECOUNTRY(false) //set true to get infolog when active country is evaluated
int i;
str callingPath;
int line;
if(#DEBUG_ALL || #DEBUG_SINGLECOUNTRY)
{
//initialize context
callingPath = subStr(conPeek(xSession::xppCallStack(),3),4,999);
line = conPeek(xSession::xppCallStack(),4);
}
if(#DEBUG_ALL && ! #DEBUG_SINGLECOUNTRY)
{
//print context of every country evaluated
for(i=1; i <= conLen(_isoCountryCodes); i++)
{
info(strFmt("%1 %2 %3",conPeek(_isoCountryCodes,i),callingPath,line),"",SysInfoAction_Editor::newLineColumn(callingPath,line));
}
}
if (conFind(_isoCountryCodes, SysCountryRegionCode::countryInfo(_selectableDataArea)))
{
if(#DEBUG_SINGLECOUNTRY)
{
//print context of active country evaluated
info(strFmt("%1 %2 %3",SysCountryRegionCode::countryInfo(_selectableDataArea),callingPath,line),"",SysInfoAction_Editor::newLineColumn(callingPath,line));
}
return true;
}
return false;
}

Leave a Reply