I'm trying to create an OmniScript that allows users to enter addresses as separate street, city, state, postal code, and country fields.
After some searching around, I found code to create an Apex class and methods that would retrieve the list of all states and of all countries from the org, and return it as a picklist that OmniScript can use.
However, I can't find any documentation or example that will let me make the state picklist dependent on the country selection, when both are using Apex code (instead of fields of SObjects). Without it, the state picklist displays a list of all states and provinces in all countries, which is obviously not desirable.
Does anyone know how to approach this? I've looked at the answers to this question but they don't seem to work in an OmniScript context.