You need to sign in to do that
Don't have an account?
patske
URLFOR syntax
Hi guys I've browsed around the forums a little and looked through the pdf's but just can't seem to get this one right. I'm missing something simple. I know I've overlooked something but I can't find it. Sorry
Can someone let me know how I can make this bit of code on my visual force page... return to the page I'm currently on once it's clicked?
Basically how do I set RetURL for a URLFOR? If someone could write it out for me that would be great.
I need it to return to /apex/addsalesprospectId={!Account.Id} when I'm finished.
Sorry and thanks to anyone that helps.
Message Edited by patske on 06-04-2008 11:14 PM
Can someone let me know how I can make this bit of code on my visual force page... return to the page I'm currently on once it's clicked?
Code:
URLFOR($Action.Sales_Contact__c.Delete, c.Id, null, true)
I need it to return to /apex/addsalesprospectId={!Account.Id} when I'm finished.
Sorry and thanks to anyone that helps.
Message Edited by patske on 06-04-2008 11:14 PM
then look on that page for retURL
hope this helps.
URLFOR
In this example, the s-control displays a message to users when they click Close Case on a case with no associated solutions. If the case is associated with at least one solution, the close case page displays as usual. To implement this example, create an s-control with the content above. Then, override the close case option using the s-control.
This example shows how you can validate data using a standard button override. Use validation rules to validate data on a record and an s-control like the one in this example to validate associated data. This example does not apply to records updated using the API.
This example uses the URLFOR function to build Salesforce URLs rather than hard-coding them, which is more scalable. It also sets the no override argument to "true," telling Salesforce to ignore the override and call a standard close case action within an override.
I am using an extended Account controller.
GerhardNewman2 wrote:
I am using an extended Account controller.
Not sure if thats going to help you or not.
and in my controller:
Hope something here help you!
Lets say I have an Apex page called 'HelloWorld' that would have the URL: /apex/HelloWord
Can you reference this in URLFOR by doing *something* like:
$Page.HelloWorld as you would $Action.Contact.New?
Thanks
Parker
<apex:outputLink value="{!URLFOR($Page.HelloWorld)}">Hello World</apex:outputLink>
However, I cannot use that syntax in a custom S-Control. The following S-control does not validate:
Some background on my use case:
- I'm trying to override the Activity History's View All button
- I want to add custom logic to the button such that if the current page is displaying the details for a Contact, the link navigates to a different page that if the Current Page is displaying the details for an Account.
- I realize that ActivityHistory and Activities are a special beast with various Polymorphic References depending on if the activity is a Task or Event. However, I recognize that SF has solved this problem in : ui/core/ViewAllActivityHistoryPage which I assume is a VisualForce page that displays the Activity history for an abritrary Object.
-Parker