Questions tagged [country-and-state]
The country-and-state tag has no usage guidance.
64
questions
1
vote
1answer
37 views
Using Apex to query Country Picklist Integration Values
We are using global country picklist in our org. For historical reasons, some of our countries have a difference in the name of the country and the integration value of the country. From Apex, I ...
0
votes
1answer
43 views
Account Billing Address Picklist without State and Country Picklists
I'm trying to replace the Standard BillingCountry field on the Account with a picklist, but it seems I can't remove the standard field and replace it with a custom picklist - does anyone have any idea ...
0
votes
0answers
19 views
Country and state picklist with lightning web components
How can I capture the country and state picklist in lightning web component picklist input?
Please help me to give some guidance.
Thanks
Sunil Kr. Gupta
0
votes
2answers
75 views
The ShippingStateCode field contains 21, which is not an available state
I changed some integration values from the country / state pick list:
When I try to insert a record by integration, I get the error: "The ShippingStateCode field contains 21, which is not an ...
1
vote
1answer
183 views
Can we query State and Country/Territories Picklist via SOQL? [closed]
We need to check the validations manually in Batch Apex while creating SF Accounts?
We have a scenario where we store all the data in our Custom Object (brought the data from the third party).
In a ...
1
vote
1answer
786 views
Display State Picklist Values in Custom LWC Record-Edit-Form
I have a custom LWC that displays contact information to edit. One of the fields is the MailingState. Currently this field is a standard input field but I would like it to display as a picklist. Its ...
2
votes
1answer
38 views
A user at higher role should have access to his subordinates records only. Is the solution to create multiple roles for the same level?
I have the following situation for role hierarchy:
World
|
-------------
| |
Europe Asia
| |...
0
votes
0answers
38 views
Country/State Picklist Management through trigger
I am trying to map country and state from one custom object say 'User Submission' to Account's billing address. My custom object has more values of countries and states than standard Country/State ...
0
votes
1answer
202 views
Can I add additional fields to “State and Country Picklists”
My org uses "State and Country Picklists" and I've been asked if it's possible add additional fields to the object so we can align each country to a region, sub-region and cluster and the ISO 3 digit ...
2
votes
1answer
185 views
State and Country/Territory picklist enabled
Why is apex Trigger unable to get value from Country/BillingCountry field in a BEFORE INSERT/UPDATE trigger when State and Country/Territory picklist enabled and data created from salesforce UI in ...
0
votes
1answer
2k views
How to apply State and Country Picklist on a Custom Object after enabling the feature
I followed the instructions for enabling the State and Country Picklist from https://resources.docs.salesforce.com/222/latest/en-us/sfdc/pdf/state_country_picklists_impl_guide.pdf
And afterwards when ...
1
vote
1answer
147 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
1answer
45 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 ...
2
votes
1answer
897 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
60 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
1answer
983 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
160 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
1answer
182 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
441 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
184 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
1k 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
1k 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
365 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
3k 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
3k 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
122 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 ...
3
votes
1answer
800 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
346 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
58 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
2answers
1k 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
436 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
2k 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
2k 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 ...
2
votes
1answer
3k 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
1k 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
18 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
358 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
82 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 ...
1
vote
2answers
3k 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
1k 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
613 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
1k 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
3answers
941 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
120 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 and ...
3
votes
1answer
3k 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
68 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
246 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
302 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
641 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 ...