Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Modular extension of capabilities#15

Open
klauskopec wants to merge 4 commits intoSalesforceLabs:masterfrom
kkopec-sfdc:master
Open

Modular extension of capabilities#15
klauskopec wants to merge 4 commits intoSalesforceLabs:masterfrom
kkopec-sfdc:master

Conversation

@klauskopec
Copy link

I added

  1. 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.

  2. 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 Error on Country Filters #1) shows an empty line with a red asterisk, which is not great UX.

  3. 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.

  4. Added reloading of map with pin at new coordinates if geolocation fields are manually edited.

If the Flow component has setting "Detailed Address Fields Required" set
to "True", the address fields will be shown as required (i.e., red asterisk).
This allows the user to set the address label to be shown as title below the search field, but above the address detail fields. This is especially useful if 'Detailed Address Fields Required' is set to true, as it will add a label where otherwise only a red asteriks is shown, indicating that the whole inputAddress component is set to required.
Added flow attribute (boolean) to let users choose whether to display latitude/longitude fields. If true, they are shown below the address details fields.

Currently they are read-only.
The implemented mechanism should also work, once we add the option to change latitude/longitude by moving the pin on the map.
@jimpdx
Copy link

jimpdx commented Feb 14, 2023

@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.

image

@klauskopec
Copy link
Author

@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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants