• Chris Goderie
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
Hello,

I am trying to create a workflow formula on the account object to have a custom text-field called Region getting updated based on the BillingCountry field value of the account. First tried this with a direct formula field but I red somewhere there are limitations to the number of characters or size of the formula that can be maximum used. However when creating the workflow I still get the error: Error, The size of your string is 4.448 bytes but may not exceed 4.000 bytes.

See formula below which are a lot of nested CASES checking for countries we have in Asia, Latin America and North America and if the country is different it will select Europe (which has most of the countries we use).

Any idea why this does not work? The syntax is correct and I thought with workflow there are no limitations in the formula-size.

Thanks,

Chris


CASE(BillingCountry,  "Afghanistan",  "Asia",  "American Samoa",  "Asia",  CASE(BillingCountry,  "Australia",  "Asia",  "Bangladesh",  "Asia",  
CASE(BillingCountry,  "Bhutan",  "Asia",  "Brunei Darussalam",  "Asia",  CASE(BillingCountry,  "Cambodia",  "Asia",  "China",  "Asia",  
CASE(BillingCountry,  "Cook Islands",  "Asia",  "Fiji",  "Asia",  CASE(BillingCountry,  "French Polynesia",  "Asia",  "Guam",  "Asia",  
CASE(BillingCountry,  "Hong Kong",  "Asia",  "India",  "Asia",  CASE(BillingCountry,  "Indonesia",  "Asia",  "Japan",  "Asia",  
CASE(BillingCountry,  "Kiribati",  "Asia",  "Korea, Democratic People's Republic of",  "Asia",  CASE(BillingCountry,  "Korea, Republic of",  "Asia",  "Lao People's Democratic Republic",  "Asia",  
CASE(BillingCountry,  "Macao",  "Asia",  "Malaysia",  "Asia",  CASE(BillingCountry,  "Maldives",  "Asia",  "Marshall Islands",  "Asia",  
CASE(BillingCountry,  "Micronesia, Federated States of",  "Asia",  "Mongolia",  "Asia",  CASE(BillingCountry,  "Myanmar",  "Asia",  "Nepal",  "Asia",  
CASE(BillingCountry,  "New Caledonia",  "Asia",  "New Zealand",  "Asia",  CASE(BillingCountry,  "Niue",  "Asia",  "Norfolk Island",  "Asia",  
CASE(BillingCountry,  "Northern Mariana Islands",  "Asia",  "Pakistan",  "Asia",  CASE(BillingCountry,  "Palau",  "Asia",  "Papua New Guinea",  "Asia",  
CASE(BillingCountry,  "Philippines",  "Asia",  "Samoa",  "Asia",  CASE(BillingCountry,  "Singapore",  "Asia",  "Solomon Islands",  "Asia",  
CASE(BillingCountry,  "Sri Lanka",  "Asia",  "Taiwan, Province of China",  "Asia",  CASE(BillingCountry,  "Thailand",  "Asia",  "Timor-Leste",  "Asia",  
CASE(BillingCountry,  "Tokelau",  "Asia",  "Tonga",  "Asia",  CASE(BillingCountry,  "Tuvalu",  "Asia",  "Uzbekistan",  "Asia",  
CASE(BillingCountry,  "Vanuatu",  "Asia",  "Viet Nam",  "Asia",  CASE(BillingCountry,  "Wallis and Futuna",  "Asia",  "Antigua and Barbuda",  "Latin America",  
CASE(BillingCountry,  "Argentina",  "Latin America",  "Aruba",  "Latin America",  CASE(BillingCountry,  "Bahamas",  "Latin America",  "Barbados",  "Latin America",  
CASE(BillingCountry,  "Belize",  "Latin America",  "Bermuda",  "Latin America",  CASE(BillingCountry,  "Bolivia",  "Latin America",  "Brazil",  "Latin America",  
CASE(BillingCountry,  "Caribean",  "Latin America",  "Cayman Islands",  "Latin America",  CASE(BillingCountry,  "Chile",  "Latin America",  "Colombia",  "Latin America",  
CASE(BillingCountry,  "Costa Rica",  "Latin America",  "Cuba",  "Latin America",  CASE(BillingCountry,  "Dominica",  "Latin America",  "Dominican Republic",  "Latin America",  
CASE(BillingCountry,  "Ecuador",  "Latin America",  "El Salvador",  "Latin America",  CASE(BillingCountry,  "French Guiana",  "Latin America",  "Grenada",  "Latin America",  
CASE(BillingCountry,  "Guadeloupe",  "Latin America",  "Guatemala",  "Latin America",  CASE(BillingCountry,  "Guyana",  "Latin America",  "Haiti",  "Latin America",  
CASE(BillingCountry,  "Honduras",  "Latin America",  "Jamaica",  "Latin America",  CASE(BillingCountry,  "Martinique",  "Latin America",  "Mexico",  "Latin America",  
CASE(BillingCountry,  "Netherlands Antilles",  "Latin America",  "Nicaragua",  "Latin America",  CASE(BillingCountry,  "Panama",  "Latin America",  "Paraguay",  "Latin America",  
CASE(BillingCountry,  "Peru",  "Latin America",  "Puerto Rico",  "Latin America",  CASE(BillingCountry,  "Saint Kitts and Nevis",  "Latin America",  "Saint Lucia",  "Latin America",  
CASE(BillingCountry,  "Saint Vincent and The Grenadines",  "Latin America",  "Suriname",  "Latin America",  CASE(BillingCountry,  "Trinidad and Tobago",  "Latin America",  "Turks and Caicos Islands",  "Latin America",  
CASE(BillingCountry,  "Uruguay",  "Latin America",  "Venezuela, Bolivarian Republic of",  "Latin America",  CASE(BillingCountry,  "Virgin Islands, British",  "Latin America",  "Virgin Islands, U.S.",  "Latin America",  
CASE(BillingCountry,  "Canada",  "North America",  "United States",  "North America",  "Europe")))))))))))))))))))))))))))))))))))))))))))))))))
Hello. I am pretty new to the Salesforce custom development but I have 2 (simple?) questions. In our company we are using 2 categories in multiple objects: "Brand" (single pick-list) and "Focus" (multi-select pick-list) and these 2 fields are being linked (Brand is controlling field for Ficus) meaning that based on selected Brand only valid Focus-values for that Brand can be selected. We have these Custom fields in many Salesforce-objects like: Account, Lead, Oppertunity etc.
  • Q1: is there a way in Salesforce to only set-up these Custom fields once and use them in multiple objects so maintaining them is much more easy?
  • Q2: we also have the Brand and Focus custom fields added to the User object. Currently we are building a new custom object for Sales Calls and also here the Brand and Focus is used. Is there a way to default the Brand and Focus values in this object based on the values from the user's User object? 
Hello,

I am trying to create a workflow formula on the account object to have a custom text-field called Region getting updated based on the BillingCountry field value of the account. First tried this with a direct formula field but I red somewhere there are limitations to the number of characters or size of the formula that can be maximum used. However when creating the workflow I still get the error: Error, The size of your string is 4.448 bytes but may not exceed 4.000 bytes.

See formula below which are a lot of nested CASES checking for countries we have in Asia, Latin America and North America and if the country is different it will select Europe (which has most of the countries we use).

Any idea why this does not work? The syntax is correct and I thought with workflow there are no limitations in the formula-size.

Thanks,

Chris


CASE(BillingCountry,  "Afghanistan",  "Asia",  "American Samoa",  "Asia",  CASE(BillingCountry,  "Australia",  "Asia",  "Bangladesh",  "Asia",  
CASE(BillingCountry,  "Bhutan",  "Asia",  "Brunei Darussalam",  "Asia",  CASE(BillingCountry,  "Cambodia",  "Asia",  "China",  "Asia",  
CASE(BillingCountry,  "Cook Islands",  "Asia",  "Fiji",  "Asia",  CASE(BillingCountry,  "French Polynesia",  "Asia",  "Guam",  "Asia",  
CASE(BillingCountry,  "Hong Kong",  "Asia",  "India",  "Asia",  CASE(BillingCountry,  "Indonesia",  "Asia",  "Japan",  "Asia",  
CASE(BillingCountry,  "Kiribati",  "Asia",  "Korea, Democratic People's Republic of",  "Asia",  CASE(BillingCountry,  "Korea, Republic of",  "Asia",  "Lao People's Democratic Republic",  "Asia",  
CASE(BillingCountry,  "Macao",  "Asia",  "Malaysia",  "Asia",  CASE(BillingCountry,  "Maldives",  "Asia",  "Marshall Islands",  "Asia",  
CASE(BillingCountry,  "Micronesia, Federated States of",  "Asia",  "Mongolia",  "Asia",  CASE(BillingCountry,  "Myanmar",  "Asia",  "Nepal",  "Asia",  
CASE(BillingCountry,  "New Caledonia",  "Asia",  "New Zealand",  "Asia",  CASE(BillingCountry,  "Niue",  "Asia",  "Norfolk Island",  "Asia",  
CASE(BillingCountry,  "Northern Mariana Islands",  "Asia",  "Pakistan",  "Asia",  CASE(BillingCountry,  "Palau",  "Asia",  "Papua New Guinea",  "Asia",  
CASE(BillingCountry,  "Philippines",  "Asia",  "Samoa",  "Asia",  CASE(BillingCountry,  "Singapore",  "Asia",  "Solomon Islands",  "Asia",  
CASE(BillingCountry,  "Sri Lanka",  "Asia",  "Taiwan, Province of China",  "Asia",  CASE(BillingCountry,  "Thailand",  "Asia",  "Timor-Leste",  "Asia",  
CASE(BillingCountry,  "Tokelau",  "Asia",  "Tonga",  "Asia",  CASE(BillingCountry,  "Tuvalu",  "Asia",  "Uzbekistan",  "Asia",  
CASE(BillingCountry,  "Vanuatu",  "Asia",  "Viet Nam",  "Asia",  CASE(BillingCountry,  "Wallis and Futuna",  "Asia",  "Antigua and Barbuda",  "Latin America",  
CASE(BillingCountry,  "Argentina",  "Latin America",  "Aruba",  "Latin America",  CASE(BillingCountry,  "Bahamas",  "Latin America",  "Barbados",  "Latin America",  
CASE(BillingCountry,  "Belize",  "Latin America",  "Bermuda",  "Latin America",  CASE(BillingCountry,  "Bolivia",  "Latin America",  "Brazil",  "Latin America",  
CASE(BillingCountry,  "Caribean",  "Latin America",  "Cayman Islands",  "Latin America",  CASE(BillingCountry,  "Chile",  "Latin America",  "Colombia",  "Latin America",  
CASE(BillingCountry,  "Costa Rica",  "Latin America",  "Cuba",  "Latin America",  CASE(BillingCountry,  "Dominica",  "Latin America",  "Dominican Republic",  "Latin America",  
CASE(BillingCountry,  "Ecuador",  "Latin America",  "El Salvador",  "Latin America",  CASE(BillingCountry,  "French Guiana",  "Latin America",  "Grenada",  "Latin America",  
CASE(BillingCountry,  "Guadeloupe",  "Latin America",  "Guatemala",  "Latin America",  CASE(BillingCountry,  "Guyana",  "Latin America",  "Haiti",  "Latin America",  
CASE(BillingCountry,  "Honduras",  "Latin America",  "Jamaica",  "Latin America",  CASE(BillingCountry,  "Martinique",  "Latin America",  "Mexico",  "Latin America",  
CASE(BillingCountry,  "Netherlands Antilles",  "Latin America",  "Nicaragua",  "Latin America",  CASE(BillingCountry,  "Panama",  "Latin America",  "Paraguay",  "Latin America",  
CASE(BillingCountry,  "Peru",  "Latin America",  "Puerto Rico",  "Latin America",  CASE(BillingCountry,  "Saint Kitts and Nevis",  "Latin America",  "Saint Lucia",  "Latin America",  
CASE(BillingCountry,  "Saint Vincent and The Grenadines",  "Latin America",  "Suriname",  "Latin America",  CASE(BillingCountry,  "Trinidad and Tobago",  "Latin America",  "Turks and Caicos Islands",  "Latin America",  
CASE(BillingCountry,  "Uruguay",  "Latin America",  "Venezuela, Bolivarian Republic of",  "Latin America",  CASE(BillingCountry,  "Virgin Islands, British",  "Latin America",  "Virgin Islands, U.S.",  "Latin America",  
CASE(BillingCountry,  "Canada",  "North America",  "United States",  "North America",  "Europe")))))))))))))))))))))))))))))))))))))))))))))))))
Hello. I am pretty new to the Salesforce custom development but I have 2 (simple?) questions. In our company we are using 2 categories in multiple objects: "Brand" (single pick-list) and "Focus" (multi-select pick-list) and these 2 fields are being linked (Brand is controlling field for Ficus) meaning that based on selected Brand only valid Focus-values for that Brand can be selected. We have these Custom fields in many Salesforce-objects like: Account, Lead, Oppertunity etc.
  • Q1: is there a way in Salesforce to only set-up these Custom fields once and use them in multiple objects so maintaining them is much more easy?
  • Q2: we also have the Brand and Focus custom fields added to the User object. Currently we are building a new custom object for Sales Calls and also here the Brand and Focus is used. Is there a way to default the Brand and Focus values in this object based on the values from the user's User object?