AddressPickerAutocompleteForFlow
AddressPickerAutocompleteForFlow copied to clipboard
Modular extension of capabilities
I added
-
Option to make the address detail + county fields required. They'll only be required if they are also shown to the user to avoid broken states where users cannot continue while not being able to see the field they would need to enter data into. This can be configured via a Flow attribute and defaults to "not required.
-
Capability to add an address label, which is shown at the top of the addressInput component. Without a label (which is still the default), making the fields required (see #1) shows an empty line with a red asterisk, which is not great UX.
-
Option to show R/W geolocation fields (can be configured via Flow attribute; default: not shown). This can be used to fine-adjust coordinates without changing the address in cases where the google maps API returned a correct address with a faulty geolocation.
-
Added reloading of map with pin at new coordinates if geolocation fields are manually edited.
@klauskopec have you encountered the issue that the Country codes returned from Google Places API are not compatible with the new "Country/State Picklists" in Salesforce? My testing is returning "United States" which is being rejected, even when the "Integration Value" is "United States" (in my org it is actually US). Just curious.

@jimpdx I have not encountered that error back when I implemented this. However, I've not used the component much after that, so it's possible that recent changes on either side broke something.