You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to other issues, but there are problems with the way that addresses are formatted for non-US addresses. Basically the validation framework seems to assume a limited amount of formatting possibilities, locking us into non-standard formats.
Here in Australia, our postal format is:
28 Buckingham Ave
Bentleigh VIC 3204
Australia
The Google geocoding API formats this correctly. When returned from the backend, it gives: "28 Buckingham Ave, Bentleigh VIC 3204, Australia". But NPSP will format it in a very US style, expanding Ave to Avenue and shortening Australia to AU:
28 Buckingham Avenue
Bentleigh, VIC 3204
AU
This is due to the way the address format is hardcoded in the validator:
I would recommend if possible, following "formatted_address" for the final format, particularly when choosing between short and long versions of the address segments. or providing the formatted address as a field on the address object for others to reference if need be. Or maybe offer a format string to allow the user to specify the address format they would like to have.
I'm very happy to contribute to a fix here, it would be good to just get guidance on the desired path to go down.
The text was updated successfully, but these errors were encountered:
This is similar to other issues, but there are problems with the way that addresses are formatted for non-US addresses. Basically the validation framework seems to assume a limited amount of formatting possibilities, locking us into non-standard formats.
Here in Australia, our postal format is:
28 Buckingham Ave
Bentleigh VIC 3204
Australia
The Google geocoding API formats this correctly. When returned from the backend, it gives: "28 Buckingham Ave, Bentleigh VIC 3204, Australia". But NPSP will format it in a very US style, expanding Ave to Avenue and shortening Australia to AU:
28 Buckingham Avenue
Bentleigh, VIC 3204
AU
This is due to the way the address format is hardcoded in the validator:
NPSP/force-app/main/default/classes/ADDR_GoogleGeoAPI_Validator.cls
Lines 373 to 406 in 53157c1
I would recommend if possible, following "formatted_address" for the final format, particularly when choosing between short and long versions of the address segments. or providing the formatted address as a field on the address object for others to reference if need be. Or maybe offer a format string to allow the user to specify the address format they would like to have.
I'm very happy to contribute to a fix here, it would be good to just get guidance on the desired path to go down.
The text was updated successfully, but these errors were encountered: