function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
GregoryGregory 

File button no longer works

We've used for over a year now a button that opened up a file browser to a network drive.   The behavior for the custom button was set to "Display in new Window" and the "Content Source" was set to "URL".  The actual field was set to "P:\DirectoryName".  
 
Now, when we click on that button, we get an error:
 
cannot find 'file:///P://DirectoryName'  Make sure the path or Internet address is correct.
 
Note that the single backslash has been replaced by 2 forward slashes, and salesforce added 2 leading forward slashes.   Has something changed recently in Salesforce related to custom buttons?
GregoryGregory

We figured out the problem.  We simply replaced the backslashes with forward slashes.  So now the content is "P:/DirectoryName".

Does anyone know why the backslashes worked for over a year and now do not?

rpr2rpr2

We had some custom buttons break on Thursday morning and discovered it was due to a maintenance patch on Wednesday evening that changed the encoding of URLs.  It was fixed with another patch that was done on Friday evening.  In our case, \n was being inserted in the URL wherever we had a carriage return within the code for our button.  All is good now.

If you're curious, you may want to change your button back to how it used to be and see if it works now.  My guess is that it will.