3

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?

5
  • Is their visibility issue in a Page Layout? Visualforce Page? Lightning?
    – Adrian Larson
    Feb 13, 2017 at 10:50
  • @AdrianLarson It's in the Page Layout and it's just the standard view. That's the odd thing. Does Salesforce generate picklists client side? I'm wondering if it's a JavaScript issue.
    – Dan Jones
    Feb 13, 2017 at 10:56
  • @AdrianLarson Another User has the same problem, they're using different browsers as it happens (Firefox and Chrome) which for me rules out anything client side, but they're using the same profile.
    – Dan Jones
    Feb 13, 2017 at 11:06
  • Do they have access to the RecordType itself?
    – Adrian Larson
    Feb 13, 2017 at 11:07
  • 1
    @AdrianLarson I've just double checked in case I'm going mad and they do. There's two record types of which the profiles have access to both.
    – Dan Jones
    Feb 13, 2017 at 11:33

1 Answer 1

4

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)

1
  • I'd literally cleared the browser cache yesterday as I suspected Spring '17 had something to with it. After this, it worked and was about to post a much less detailed answer. Thanks for this.
    – Dan Jones
    Feb 14, 2017 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .