You need to sign in to do that
Don't have an account?
RyanYoung429
Edit Return URL in Visualforce Page
Hello!
I have some code for a VF page and the RetURL is home:
, [retURL='/home/home.jsp'],
How do i have it return to the record of the custom object that start the process?
Thanks so much,
Ryan
I have some code for a VF page and the RetURL is home:
, [retURL='/home/home.jsp'],
How do i have it return to the record of the custom object that start the process?
Thanks so much,
Ryan
How is the VF page opened? By click of a button or click of hyperlink? You can send a parameter in the url which will have the record id. In you controller you can retrieve the parameter by using below piece of code.
Let me know if this helps. Thanks.
"Invalid parameter for function URLFOR
Error is in expression '{!IF(Sales_Order__c.Status__c== 'Closed' || Sales_Order__c.Status__c== 'Terminated', NULL, URLFOR($Action.Sales_Order__c.Delete, $CurrentPage.parameters.id, [retURL='/home/home.jsp'], TRUE))}' in component <apex:page> in page slordeleteoverrides
"
Which is strane because it is the same exact page that was used on another custom object. Any idea what this means @Ravi?
, [retURL=ApexPages.currentPage.getParameters().get('Id')], TRUE))}">
Try this.
<apex:page standardController="Sales_Order__c"
action="{!IF(Sales_Order__c.Status__c== 'Closed' || Sales_Order__c.Status__c== 'Terminated', NULL, URLFOR($Action.Sales_Order__c.Delete, $CurrentPage.parameters.id, [retURL='/'+ApexPages.currentPage.getParameters().get('Id')], TRUE))}">
<apex:pageMessage title="Unauthorized"
summary="This Sales Order is in in {!Sales_Order__c.Status__c } status and cannot be edited!"
severity="ERROR"
strength="3">
</apex:pageMessage>
</apex:page>
<apex:page standardController="Sales_Order__c"
apiVersion=""
action="{!IF(Sales_Order__c.Status__c== 'Closed' || Sales_Order__c.Status__c== 'Terminated', NULL, URLFOR($Action.Sales_Order__c.Delete, $CurrentPage.parameters.id, [retURL='/'+ApexPages.currentPage().getParameters().get('Id')], TRUE))}">
<apex:pageMessage title="Unauthorized"
summary="This Sales Order is in in {!Sales_Order__c.Status__c } status and cannot be edited!"
severity="ERROR"
strength="3">
</apex:pageMessage>
</apex:page>