+ Start a Discussion
Mattias NordinMattias Nordin 

How do I point a custom link to go to a URL after an operation is executed?

 

Hi all Gurus,

 

I have created a visualforce page that shows quote information. The purpose is to have this information sent to the order office when the quote is won.

 

I have created a data quality check that is executed before the page is posted. If data is not correct the field itself will be a link to the page holding that field (account page, contact page or opportunity page).

 

I have found the following knowledge article that is interesting...

https://help.salesforce.com/apex/HTViewSolution?id=104305&language=en

 

  

  

QUESTION:
How do i create a link that opens the contact page and redirects back to my other page when/if the contact page is saved?

 

I have tried several times but not found the right syntax yet. The page is not redirecting back after save. Please advice...

This is the link that i use to open the contact page

 

onDblClick="document.location.href='https://flir.my.salesforce.com/{!Opportunity.sold_to_contact__r.Id}'"

 

I have tried the following:

 

onDblClick="document.location.href='https://flir.my.salesforce.com/{!Opportunity.sold_to_contact__r.Id}?saveURL=%2F00120000009QdoSAAS'"

 

 Above does not work.

 

  • Anyone know if this should be possible to accomplish???

 

 Thanks

 

Mattias NordinMattias Nordin

Interesting... this works. If i open the page in edit mode directly the return url works.

 

https://xxx.my.salesforce.com/0032000000dHGNh/e?retURL=00120000009QdoSAAS

 

So i guess the problem is that the server URL encodes the url when the edit button is pressed... hmmm...