[SalesForce] Picklist values added to Record Type, but still not showing

I've got a strange problem with a Picklist field.

We've got a Global Picklist Set called "Months" with values January through December and a field called Month__c on object Forecast__c. One particular user can't see the values. I've checked the following:

  • Values are added to relevant record types
  • User's profile has relevant object permissions
  • User's profile has relevant field permissions

What's odd is that I logged in as the User and the values are there. Am I missing something obvious here? Is this some kind of bug I'm not aware of?

Best Answer

We just had the same problem with some clients, and after some digging it had something to do with the Spring 17 release.

Your browser caches assets from the server locally (javascript, css, ...), in Spring 17 a change was made to picklists.js, a javascript file responsible for filling picklist values. In some cases users still had the old javascript from before the release cached in their browser, and that old file doesn't work with the new way of filling picklist values.

The easy way to fix it is by clearing your local files. In chrome you can do this by following these steps:

  • Open the page that doesn't show the picklist values
  • Open Developer Tools (F12, or right mouse button somewhere in the page -> inspect element)
  • Go to the Network tab
  • On the top check the "Disable cache" checkbox
  • Reload your page
  • Uncheck the "Disable cache"
  • Close developer tools

enter image description here

If a Salesforce developer reads this:

When your browser tries to load a page which loads a javascript file, it will look at the URL of the javascript file, and then look in the local cache if the javascript file for that URL is present. If so, for performance reasons, the javascript file from the cache will be loaded instead of the remote javascript file.

This can easily be solved by adding a fingerprint to the URL of the javascript file. For example:

<script src="myscripts.js?fingerprint=023UJKdlmamlsqdvNNKKl"></script>

The moment the javascript file is changed (with a new release or whatever), just change the fingerprint, and the file will be cached again locally. (It can be whatever parameter you want, as long as the SRC changes)

Related Topic