0

I am working in my Sandbox environment and tried to use a Custom Button we created last year that works fine in production. I am receiving the following error when trying to create a new record (Case Reason object) related to the Case object.

Invalid Page Redirection The page you attempted to access has been blocked due to a redirection to an >outside website or an improperly coded link or button. Please contact your >salesforce.com Administrator for assistance. For more information, see >Insufficient Privileges Errors.

Close this tab to continue.

The original custom button code that works in production is:

"/a0J/e?RecordType={!Case.Case_Reason_RT__c}& 
CF00Ni000000DvBrn_lkid={!Case.Id}& 
CF00Ni000000DvBrn={!Case.CaseNumber}& 
retURL=%2F{!Case.Id}& 
cancelURL=/{!Case.Id}"

The problem is when clicking save I'm getting the retURL error above. Canceling the record creation is acting as intended. I will say we are using this custom button in the console so I'm wondering if the console is causing the URL to break since they do not have an ID? Any alternatives or way to correct this code so I can test in Sandbox?

I'm afraid the update Salesforce recently applied to the console configuration broke this custom button functionality we were using to create a new record.

  • 3
    You are hardcoding some custom field Id's. Custom field Id's can differ in your sandbox. Check Id's of those custom fields by inspecting that field in your browser. – sf_user Jul 4 '16 at 5:54
0

Try removing the spaces from your URL, ie.

"/a0J/e?RecordType={!Case.Case_Reason_RT__c}&CF00Ni000000DvBrn_lkid={!Case.Id}&CF00Ni000000DvBrn={!Case.CaseNumber}&retURL=%2F{!Case.Id}&cancelURL=/{!Case.Id}"

  • thanks for the suggestion but removing the spaces still resulted in the same error, unfortunately. : / – Jess Carosello Oct 28 '15 at 14:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.