if (finAccountCode == null) {
return null;
}
Pattern filterRegex = Pattern.compile("[^0-9A-Z]");
finAccountCode = finAccountCode.toUpperCase().replaceAll(filterRegex.pattern(), "");
// now we need to get the encrypted version of the fin account code the user passed in to look up against FinAccount
// we do this by making a temporary generic entity with same finAccountCode and then doing a match
GenericValue encryptedFinAccount = delegator.makeValue("FinAccount", UtilMisc.toMap("finAccountCode", finAccountCode));
delegator.encryptFields(encryptedFinAccount);