+ Start a Discussion
Luke Higgins - RFLuke Higgins - RF 

Integration value for country in Flow - error with Winter '17 release

I have a flow that asks for the user to select a country using the countrypicklist field on a screen element. Before the Winter '17 rollout this picklist worked fine. Now the country values being used in the picklist selection are the country's 'country/territory code' (abbreviation) and not the integration value (country spelled out) like before.
The state/country picklist feature requires the country spelled out fully, for example 'Australia' like in the example of an account creation from earlier this year below.

Sept 13, 2016
RECORD CREATE: Create_New_Account
Create one Account record where:
BillingCountry = {!vCountrypicklist} (Australia)
BillingState = {!vStatePicklist} (null)
Name = {!vAccountName} (Itaasol Pty Ltd )
New_CCID__c = {!vCCID} (F31101)
RecordTypeId = {!vRecordType} (012A0000000nxacIAA)
Type = {!vType} (Accounting Firm)

Now the result of the entered country in the screen is the abbreviated country...

RECORD CREATE: Create_New_Account
Create one Account record where:
BillingCountry = {!vCountrypicklist} (UG)
BillingState = {!vStatePicklist} (null)
Name = {!vAccountName} (account2123413)
New_CCID__c = {!vCCID} (v3246346)
RecordTypeId = {!vRecordType} (012A0000000nxacIAA)
Type = {!vType} (Accounting Firm)

And it errors out. How do I change the country picklist field in the flow back to the integration value instead of the country/territory code?
Best Answer chosen by Luke Higgins - RF
Luke Higgins - RFLuke Higgins - RF
I fixed it.  During the account creation part of the flow I was using the billingcountry field to populate the country.  Salesforce must have changed something with this field, as you can see in the two creation attempts above.  Anyway, I changed the referenced field to billingcountrycode which is what the account creation process was looking for.   Sorry if that doesn't make sense but if anyone is having issues in the future make sure the Record Create piece of the flow is referencing the billingcountrycode or statecode. 

All Answers

Gordon EngelGordon Engel
I searched but did not find anything related to country picklist abbreviations in the Salesforce database for Winter '17.  The only process manager issue I found does not appear to be related to your issue:

https://success.salesforce.com/issues_view?id=a1p3A0000008fozQAA

Can you tell me what you mean by, "it errors out"? Is it an Internal Server Error?
 
Luke Higgins - RFLuke Higgins - RF
Thanks for looking into this Gordon.  The flow is supposed to create an account based on the screen inputs from the user.   One of the fields is Countrypicklist.  Prior to winter '17 that field would populate a country spelled out entirely, not abbreviated, which is what's required for State & Country Picklists when that's enabled.  State and Country picklist feature requires the 'Integration Value'.   Now, however, when the country is selected by the user the country field is abbreviated, and when the account tries to create I get the standard, 'There's a problem with this country, even though it may appear correct. Please select a country/territory from the list of valid countries' error.

So, prior to winter '17 the countrypicklist populated the 'integration value' and now it populates the 'country/territory code'. 

state/country example
Gordon EngelGordon Engel

It seems like there were some changes in the way State & Country Picklists work in Winter '17.  You may be able to configure the behavior - take a look at this document and see if there's something useful (sorry I don't have the time to dig in right now):

https://resources.docs.salesforce.com/204/latest/en-us/sfdc/pdf/state_country_picklists_impl_guide.pdf
Luke Higgins - RFLuke Higgins - RF
I fixed it.  During the account creation part of the flow I was using the billingcountry field to populate the country.  Salesforce must have changed something with this field, as you can see in the two creation attempts above.  Anyway, I changed the referenced field to billingcountrycode which is what the account creation process was looking for.   Sorry if that doesn't make sense but if anyone is having issues in the future make sure the Record Create piece of the flow is referencing the billingcountrycode or statecode. 
This was selected as the best answer
Luke Higgins - RFLuke Higgins - RF
Thanks again Gordon for the doc.  It was researching that doc that sparked the countrycode thoughts.