We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [country-and-state]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
20 views

SFDX - Can't Create Unlocked Package Version With BillingCountryCode/BillingStateCode

I am getting an error when trying to create a version of my unlocked package after adding Apex code that references the Account.BillingCountryCode and Account.BillingStateCode fields. Everything is ...
0
votes
0answers
13 views

Clean country state data before activating country state picklist

There are about 100 different countries and many states on production. Now I want to activate the State and Country picklist. But the State data is messed up. How would I clean this up? Through ...
0
votes
1answer
25 views

How to Enable all state list for State and country picklist

We were using the state and country text field in address. Now, we have enabled the standard state and country picklist. But the state picklist is shown for only 9 countries. Eg. USA has state ...
1
vote
1answer
171 views

Enabling State and Country/Territory Picklists

Currently we are using text field to store state and country. Now we want to enable State and Country/Territory Picklists to maintain data quality in salesforce. If I enable the picklist, what all ...
0
votes
0answers
33 views

Unable to convert a lead if country if country is not defalut country

few dacks back we have enabled country & state picklist values. So, when trying to convert a lead with a country called Canada they are facing an issue. because currently, the default country is ...
0
votes
0answers
12 views

How to insert many States using API [duplicate]

I need to insert many new states into my org, but according to the following article you cannot use the metadata api: https://help.salesforce.com/articleView?id=admin_state_country_picklists_api.htm&...
0
votes
1answer
291 views

Country Code(telephone) values in Salesforce

I have a scenario wherein we want to provide users with list of CountryName Country Code to select when providing contact details , here is how the list looks like : Has anybody had a requirement and ...
0
votes
1answer
35 views

Add value to list of valid States

I added a new State for the Country 'Canada' in Setup -> State and Country/Territory Picklists. The State is 'BC' and StateCode is 'BC2'. See the image below for how it looks: Now that 'BC' is a ...
2
votes
0answers
109 views

Why does the DependentPicklists class returns empty Map when trying to output Country and State picklist?

We are implementing the DependentPicklists class found in another answer on this site. Our org has State and Country picklists enabled, so we are trying to get this to work using the Contact....
9
votes
2answers
292 views

New BUG in Winter 19: We can't turn ON Country State Picklists on fresh new Orgs (Confirmed as Know Issue by Salesforce)

We turn on Country-State-Picklists on almost every Org we touch. Assume we act on a NEW and BLANK Org, just fresh spun DE (Developer Edition) Org. But it is the same on any Org and we have tried lots ...
2
votes
0answers
126 views

Issue with Datacloud.FindDuplicates & County-State-Picklist & PURGE Data

We have a strange issue arising in the context of the Salesforce Standard Deduplication functionality. It happens only, when Country-State-Picklist are enabled and a record (Account) is set to a ...
0
votes
1answer
543 views

How do I retrieve Country and State Picklist Values (AddressSettings) via API?

How do I get a dependent list of States by Country from Salesforce via API? Our Use Case is: We need dependent Picklists on an integrated 3rd party web platform we intend to pass the returned ...
0
votes
1answer
411 views

State/Country Picklist: The BillingStateCode field contains New Jersey, which isn't an available state

I am trying to migrate our production org to State/Country picklists. I followed the instructions of scanning my org in a Dev sandbox. There was no data to convert because it was a new blank sandbox, ...
0
votes
0answers
209 views

Find state from Area Code

Our leads come in with just a phone number. I am looking to populate a custom field for the Lead State based off of that area code. I have already added a custom formula field to populate the time ...
0
votes
1answer
1k views

How do I get Country State Picklist Values in a lightning component? [duplicate]

We have State and Country Picklist enabled in the org. I cannot find a way to find out the list of states based on the selected country. I need this in the lightning component. I've used ...
4
votes
1answer
2k views

How to present state and country picklists with dependency logic in a Lightning Component?

It's not too hard to present the Contact/Account state and country picklists themselves, but the dependency filtering where when you select "United States" as the country only the 50 or so relevant ...
2
votes
1answer
81 views

StateCode, CountryCode fields not available in SalesforceDX

I am trying to switch to DX but noticed that the CountryCode and StateCode are no longer being recognized by Salesforce in DX environment. Trying to reference those fields gives me an invalid field ...
2
votes
1answer
530 views

Visualforce State and Country Picklists - Standard Fields

Question Can a Visualforce Page be built so it displays the actual picklist values and dependencies for fields which incorporate State and Country Picklists? I tried using Field Sets as well as hard-...
1
vote
2answers
223 views

Use Ampscript to convert state abbreviation to full state name

So the state data in our database is abbreviation but we have a client who wants to display the state dynamically in the body of the email but they want to display the full state name. I'm fairly new ...
3
votes
1answer
43 views

Account History tracking shows codes instead of full names after enabling State/Country picklists

I'm seeing that changes made on an Account after we have enabled State & Country/Territory Picklists on our sandbox default to showing the shortcodes for Country & State. Isn't it possible to ...
4
votes
1answer
737 views

SFDX Country/State picklist on scratch org

When I create new scratch org I'm not able push code which uses country/state picklist. Following command: force:source:push give error for class: Variable does not exist: Account....
3
votes
1answer
314 views

Automate creation of Salesforce states for countries

I would like users to be able to easily add new states to the state territory country picklist. See the picture We are an international business and it is not feasible to prefill out all the states ...
1
vote
1answer
872 views

How to get the BillingstateCode from BillingState?

I have a requirement like, If user enter BillingState manually in visualforce page then BillingStateCode must have to set automatically based on the BillingState. I am thinking to use MAP in this ...
2
votes
1answer
1k views

How to convert a two letter country code into a country name?

Before implementing country and state picklists we want to change our APEX to insert country names instead of country codes. Now. I could just have a big map of country codes to country names but the ...
1
vote
1answer
2k views

Get two letter country code in Apex method

I want to write an Apex method that takes a country name as input and returns the equivalent two letter country code (ISO A2). Is there a way to write it without explicitly hard coding all countries ...
-2
votes
2answers
820 views

How to search a custom object using one or more input pick list fields from a VF page and display the result(s) in a pageBlockTable

accept the input as strings (in an extension), build & execute the query, populate a list element, display the list. Please give an example.
1
vote
0answers
16 views

Additional geographical area on State

I'd like to add additional information on the State in Salesforce, for example the macro-area it belongs to, so that it can be used in any report, view, feature that make usage of an Address / State. ...
0
votes
0answers
276 views

State and Country Picklist on Visualforce page

I have a page which displays input fields from a fieldset on Opportunity object. The fieldset contains Country and State picklists which render properly. The only problem is when the Opportunity ...
0
votes
1answer
63 views

Issues after enabling state country pick list

We have implemented state/ country pick list after converting data. The issue is one class is shown in the customizations list which i need to update. i have below line in this class which is ...
0
votes
2answers
2k views

Error: There's a problem with this state, even though it may appear correct. Please select a state from the list of valid states

I am updating records through batch class. I have state/Country picklist enabled for my ORG, however for few set of records BillingState picklist is having following values i. UNKNOWN VALUE ...
0
votes
1answer
681 views

Get English Country Name from Country-Picklist

we plan to enable the new Salesforce Country/State-Picklists. we love the idea to have ISO Country-Codes but for a different system we need all the country-names in US-english spelling/name. our org-...
0
votes
0answers
518 views

Best Way to Populate Visualforce Picklists of Countries and States?

I am currently making a Visualforce Page for registration and I have both Country and State fields (both picklist) to populate. I have looked for resources online and I found out some possible ...
1
vote
0answers
953 views

Find whether the state code is related to the Country code

When state/country picklists are enabled, in an apex class can i find whether the state code is related to the country code. Currently if no check is done. I'm getting the below error in the visual ...
4
votes
2answers
479 views

Can I reuse the dependency logic of State and Country picklists from Account/Contact in a Apex Classes?

I have enabled the State and Country picklists in Salesforce and I was trying to get/create the same kind of country and state picklist with dependency from Contact in a visual force page. I have ...
1
vote
0answers
81 views

Mass Update And Mass Edit From List View clashes with State/Country Picklists

The following appears when I click on “Mass Update” in a list of recently created leads: core.apexpages.exceptions.ApexPagesHandledException: Object type not accessible. Please check permissions ...
3
votes
1answer
2k views

Best way to get city, state, and zip fields onto Account object?

The Account object doesn't have city, state, or zip standard fields. I can create those in custom fields, but feel like there should be a better way to do that? We want to be able to pull a report ...
1
vote
0answers
67 views

State and Country picklist scan result issue

I have used the option "Scan your org" in State and Country Picklists to get the address list and customization list (VF and APEX used) in that list one VF page is showing up which is not using city, ...
0
votes
0answers
1k views

Get state dependent picklist in apex when State and Country Picklists is enabled

I have enabled State and Country Picklists in my org. I am getting values in piclist. But the are not dependent. Like if i select country "India" i should get states only related to india. But it is ...
5
votes
1answer
217 views

How are State and Country Picklist values encoded/updated in the rendered page?

We have a bug where the state picklist does not update when the country picklist is changed in one page (with the feature working in other pages). There are no JavaScript errors in the console. To ...
1
vote
0answers
289 views

Why is Serbia not among selectable countries in Salesforce.com?

So I decided to join Salesforce Partner Community, however, I can't complete my application as I'm from Serbia and there's no Serbia as an option among the list of available countries. Does anybody ...
3
votes
0answers
495 views

Lead.Country value is null in beforeInsert with state country picklist turned on

I have code called from the before update/before insert triggers that looks at the Country value, and if found or is changed, we call some custom code to find a matching record in a custom Territory ...
4
votes
2answers
561 views

Retrieve Translated country picklist values

I wanted a Metadata API to get the Spanish translations of Address Country picklist. Using Translations type or Address doesnt help me get the values.
2
votes
2answers
967 views

Country and State picklist in apex

I want to check if state exists or not with a country in State and Country Picklist feature supported by Salesforce. I want to do this in Apex. How can I do this?
9
votes
1answer
1k views

How to write Address.settings in order to implement Country Picklists via Metadata API (eclipse)?

In order to implement Country Picklists on standard address fields I'm following the documentation here: https://help.salesforce.com/HTViewHelpDoc?id=admin_state_country_picklists_overview.htm&...
1
vote
2answers
206 views

State Picklists ignoring StyleClass Directive

I'm trying to style my state picklist and it looks like the functionality that allows statecode/countrycode to be dependent on eachother is clobbering the styleClass that I specify. When I inspect the ...
2
votes
2answers
275 views

Tough spot: updated State/Country fields to picklists but now code coverage is too low!

I recently went through the process of updating my state and country fields to picklists using the standard Salesforce tools. Perhaps foolishly I completed this update directly in production. However ...
1
vote
1answer
261 views

How can we convert a captured IP address to a country location when importing lead info from an external form, like on Unbounce?

We are capturing leads from our Unbounce landing pages, that have a Salesforce integration. Unfortunately they only provide the IP and we want to record the lead's country. How can we convert IP to ...
0
votes
1answer
402 views

How to default contact's country in mailing address based on record type

Hi we have a few record type that is separate by country. Is there a way that when I am creating a new Account record, I want to default the Country value based on the record type? For example: if I ...
2
votes
1answer
2k views

Required field validation rule for [Billing|Shipping]StateCode with State & Country picklists enabled?

When using State & Country picklist functionality, is it possible to write a Validation Rule that targets the Billing State or Shipping State fields to make them required but only when the Country ...
5
votes
1answer
1k views

Are State and Country Picklist values enforced for data inserted through the API?

We are going to be turning on State/Country picklists soon for Leads and Accounts. There is currently a process for us in place that inserts new Leads using the SForce SOAP Api). Data that is ...