You need to sign in to do that
Don't have an account?
Ryan Greene
Return URL - Maybe I'm over thinking this
I currently have a Hyperlink from a custom object "Document" to a VF page. This hyperlink is displayed on the related list on the Lead, Opp, and some other custom objects. So the VF Page can be accessed from any of the records related to the Document record. The issue I am running into is how to set the return URL. I can set the Return URL ID based on each related record but how can I tell which record the user just accessed the VF Page from?
Hyperlink formula: HYPERLINK("/apex/AttachDoc?id="& Id &"&retURL=%2F"& Lead__r.Id ,"Upload Docs Here","_self")
So the formula above would only return the user to the Lead, but what if they actually accessed the link from the Opp or one of the other custom objects?
Hyperlink formula: HYPERLINK("/apex/AttachDoc?id="& Id &"&retURL=%2F"& Lead__r.Id ,"Upload Docs Here","_self")
So the formula above would only return the user to the Lead, but what if they actually accessed the link from the Opp or one of the other custom objects?
If it's a formula field, I don't think this is possible: the URL is created once, saved in the Document record and then simply shown on different pages. It is not customized based on the page it appears on.
If it's a button on the related list, I think this is possible using a formula along the lines of: