Identify country specific functionality

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;

    {   //initialize context
        callingPath = subStr(conPeek(xSession::xppCallStack(),3),4,999);
        line = conPeek(xSession::xppCallStack(),4);

    {   //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)))
        {   //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

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s