In my developer sandbox I have created a simple custom url list button that has the following:


enter image description here

When I use this button on some of my record it results in the creation of a new record as expected. However, on other records it results in the URL No Longer Exists page.

error page

On one of the broken records, I used the standard clone button to create a copy and on the resulting record the test button works.

Inspecting the button on the broken record:

<input value=" Test " class="btn" name="test" onclick="this.form.action = '/servlet/servlet.Integration?lid=00bc0000000R8tB&amp;eid=800c0000000LDfY&amp;ic=1&amp;retURL=%2F800c0000000LDfY&amp;wrapMassAction=1&amp;scontrolCaching=1'; this.form.onsubmit = function() { return true }" title="Test" type="submit">  

Resulting URL:

Inspecting the button on the working copied record:

<input value=" Test " class="btn" name="test" onclick="this.form.action = '/servlet/servlet.Integration?lid=00bc0000000R8tB&amp;eid=800c0000000LVqG&amp;ic=1&amp;retURL=%2F800c0000000LVqG&amp;wrapMassAction=1&amp;scontrolCaching=1'; this.form.onsubmit = function() { return true }" title="Test" type="submit">  

Resulting URL:

My question: Could data in the broken record be somehow causing this issue or does anyone know what else the issue could be?

Notes: The data was imported using Jitterbit from data queried from our Production org. Our sandbox has been updated to Summer15, but I do not know if the problem started before or after the update. The standard New button works as it should on all records.

Edit: Not using visualforce on either object. The original button and record in production work fine and a clone of the record causing the error works fine.


2 Answers 2


Option 1

Seems like it may have to do with Knowledge Article Number: 000170866.

Knowledge Article Number: 000170866

Including visualforce pages in page layouts causes the page to not load and receives error: URL No Longer Exist. The URL that the error refers to is the servlet/servlet.integration trying to load the visualforce page.

Staring with Winter 13 release salesforce added a new feature in Setup -> Security Controls -> Session Setting -> Enable clickjack protection for non-setup customer Visualforce pages.

Enabling this option will cause this error. To correct the situation simply disable this option.

Option 2

Another workaround might be to try changing to a plain URL, e.g. /a0O/e. Notice that both links are the same to start (/servlet/servlet.Integration), but the broken link is still stuck there, while that becomes the (encoded) retURL param of the working link. You might have to do some URL hacking to replace lost functionality.

It seems like sometimes if your page has an error, it will redirect to the servlet. See for example this question with no answer, or this question where hard-coding may have worked. At least if your link has no retURL param, I would think it would have to show you some sort of error if there is one. If you are using standard pages that may not help much...

Option 3

This seems unlikely, but it may be that there is some sort of compile error happening. Whether that would be the result of a bug in the compiler or in your org I can't even guess. This link may offer limited insight? It doesn't really jive with your observation that this behavior is on a per record basis if you can repeatably go back and forth between the records and the behavior is consistent. Additionally if you are not experiencing lag badly enough to mention thus far, it seems an unlikely explanation. Unless you somehow have a VisualForce Home Page Component that is causing the issue.

Have you contacted support?

  • Thanks but I'm not sure this is it, I'm using standard pages and if I clone the record it works fine. Also the same record in production works fine.
    – Jenny B
    May 27, 2015 at 10:32
  • @JennyB Fair enough. I had my doubts but wasn't sure if you had seen that issue. I proposed a different workaround.
    – Adrian Larson
    May 27, 2015 at 14:33
  • The original button was a hard coded link, so I created just a quick test button to make sure it wasn't something with my url causing the issue.
    – Jenny B
    May 29, 2015 at 15:38
  • Yeah after looking at your form action values... it seems it must go to the servlet for instructions and when it directs you to the actual New page, it puts itself as the retUrl. One more idea...
    – Adrian Larson
    May 30, 2015 at 16:35
  • Thanks, haven't contacted support yet but that's my next move.
    – Jenny B
    May 30, 2015 at 16:39

I tried to replicate the issue today by extracting the same records from Production and reinserting them into my Sandbox. I was unsuccessful in causing the error. This further made me think the issue was with bad data in the record. I reviewed all fields on the record and discovered somehow I was able to import Production Ids into the Sandbox where the Id should have been invalid. Basically the CustomerSignedBy Id had the Contacts Production Id which does not exist in our Developer Sandbox org.
When I double click on the field the data disappears and when I click save it shows "Deleted" in that field. I test the button again and the errors is gone. So the answer to the question is yes invalid data can cause a custom button to error.

enter image description here

Steps to replicate the issue:
1. Export a Contract Record from Production with the CustomerSignedId populated.
2. Import the Contract Record into a Developer Sandbox and map the CustomerSignedId fields.
3. Use a custom button to create a new related record.

UPDATE: Ticket opened with Salesforce, they were able to replicate the import of an invalid Id into the CustomerSignedBy field, which is the root cause of this issue.

UPDATE II: Heard back from Salesforce today and they have turned this into a known issue and are still investigating. Until they find a fix, just make sure you are careful about importing invalid id's into lookup fields using some type of data loader as it can cause unexpected behavior.

  • I ran into this error with invalid production ids in a full sandbox. I never tracked down how it happened, but I suspected it might be related to creating a sandbox from an org over its data storage limit since sandboxes enforce the limit, but production orgs don't.
    – xn.
    Jun 1, 2015 at 18:17
  • @xn. I actually imported the production ids which it usually prevents.
    – Jenny B
    Jun 1, 2015 at 19:41
  • @JennyB Any other fields that cause this issue? Any resolution or workarounds?
    – Adrian Larson
    Jun 5, 2015 at 17:17
  • @AdrianLarson still waiting to hear back from Salesforce support, he should be at least touching base again today.
    – Jenny B
    Jun 5, 2015 at 17:24
  • 1
    @AdrianLarson heard back today, they created a Known Issue, link is in the 2nd update.
    – Jenny B
    Jun 10, 2015 at 20:15

You must log in to answer this question.

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