Print this page

"Error STRING_TOO_LONG : Industry: data value being received when updating a Standard Picklist Field

Knowledge Article Number 000003293

Error "STRING_TOO_LONG:Industry: data value too large: Air- <a really long industry name will be here> (max length=40)
Error fields: Industry" is being received when trying to upsert/update Industry field on the Lead and Account Object

The reason for this because the Standard Picklist values are only limited to 40 Characters long. There are 2 possible workarounds found to have this resolved.



The workarounds are:

A. Create a custom object for Industry and add a custom field on the Lead and Account object that is a lookup field to the new Industry object. This new lookup field will replace the standard Industry field.

Steps to implement the solution

1.     Create a custom object called Industry
    a. The Name field will have 80 characters instead of 40 for picklist field values
    b. You can add a Text Area custom field to hold an even longer name
    c. You can add additional fields such as SIC code, NAICS code or other information you wish to track with industries
    d. Add a custom dropdown field for Legacy Picklist Value to map the new Industry values to the old picklist values for historic legacy reporting purposes

2.     Create a new custom field on the Lead and Account object (anywhere you have the Industry picklist) that is a lookup to the new Industry object

3.     Populate your Industry object data via Data Loader

4.     For maximum flexibility, write an Apex trigger on any object that uses the new Industry lookup that will populate the old Industry field with the Legacy Picklist Value from the Industry object on insert and update. In this manner any legacy reports that use the standard Industry picklist will continue to function.

5.     Add the new Industry lookup field to the page layout for Leads and Accounts

6.     Remove the old standard Industry picklist from page layouts for Leads and Accounts

B. Creating a custom field on the Lead or Account Object since the limit of characters for a custom field picklist type is 255. After which you will be hiding/removing the Standard Field on the layout

Steps to implement the solution

1.     Create a custom field with Field Type as picklist
    a. Just copy the values of the Industry Standard field to the Custom
    b. Hide/Remove the Standard picklist on the pagelayout

Benefits of the new method:
• More than 40 characters available for Industry values
• Better user experience populating values via lookup instead of scrolling through a long picklist
• Better reporting possible as you can leverage additional details from the Industry custom object


promote demote