+ Start a Discussion
NewInternNewIntern 

retURL in custom link

Hi,

 

I have a custom link titled Download on my Contacts page layout. Clicking this link directly downloads a custom report. I used URL content source to achieve this.

 

The download/export function works fine; however, on clicking download, I auto navigate to a blank page having the following URL in the browser URL bar: ...force.com/servlet/servlet.Integration?lid=00bi00000016M8D&eid=003i000000Bswj8&ic=1

 

I used the following URL in the content source for the Download link and the return functionality doesn't work: /00Oi0000002vZ5W?export=1&enc=ISO-8859-1&xf=xls&retURL=%2F003i000000Bswj8

 

where 003i000000Bswj8 is the Contact record ID that has the custom Download link and is the page to which I would like to redirect (or remain on) after the Download link is clicked. With how the URL works currently, the user has to manually click back on the browser to return to the Contact record.

 

How can I modify the URL so that I remain on the same Contact record instead of staring at the ensuing blank page? If JavaScript is the only solution, I would really appreciate the code pasted here.

 

RoyGiladRoyGilad
Hi
Just change the button definitions to open in a new page, it will still open a black window but you will have the record still open in your main page.

Cheers,
NewInternNewIntern
Thanks for your response.

This is a good suggestion; however, not quite exactly what I'm looking for. The intention is to click once and do nothing else - I want to minimize the number of clicks. Your solution still calls for an extra click to close the blank window just as you would need to press the back button.