• John Smith 266
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies
I'm trying to set the finish location of a flow to the record created in that flow. I've tried setting up the controller a million different ways, but I keep getting an invalid page redirection error when the flow is finished.
 
It seems like, for some reason, my flow is not being instantiated as "theFlow". If I set the page reference to ('/' + 'home/home.jsp') or to a specific opp ID, then the finish location works fine. But any flow variable or anything referenced by theFlow.XXX fails.
 
Debug logs seem to indicate that theFlow is always null. And, if I include interview="{!theFlow}" in the visualforce page, it fails with an internal server error. All flow variables are set to input/output and there is a confirmation screen after the record create.
 
I have no idea what I might be missing. If the apex looks fine, what other user/org/security settings should I double check?
 
Here is the visualforce page code. It's being called by a custom tab if that matters. Also, all this is being done in my recently refreshed sandbox.
 
<apex:page Controller="MemberPaymentFinishController2" >
<flow:interview name="Manual_Membership_Payment" finishlocation="{!FinishPage}" />
</apex:page>

Controller: 

public class MemberPaymentFinishController2 {
    public Flow.Interview.Manual_Membership_Payment theFlow {get; set;}
    public String getFinishURL() {
        String FinishURL;
        if (theFlow==null) return '';
        else return theFlow.varOppID; }
   public PageReference getFinishPage(){
      PageReference p = new PageReference('/' + getFinishURL());
      return p; }
}
 
 
I'm trying to set the finish location of a flow to the record created in that flow. I've tried setting up the controller a million different ways, but I keep getting an invalid page redirection error when the flow is finished.
 
It seems like, for some reason, my flow is not being instantiated as "theFlow". If I set the page reference to ('/' + 'home/home.jsp') or to a specific opp ID, then the finish location works fine. But any flow variable or anything referenced by theFlow.XXX fails.
 
Debug logs seem to indicate that theFlow is always null. And, if I include interview="{!theFlow}" in the visualforce page, it fails with an internal server error. All flow variables are set to input/output and there is a confirmation screen after the record create.
 
I have no idea what I might be missing. If the apex looks fine, what other user/org/security settings should I double check?
 
public class MemberPaymentFinishController2 {
    public Flow.Interview.Manual_Membership_Payment theFlow {get; set;}
    public String getFinishURL() {
        String FinishURL;
        if (theFlow==null) return '';
        else return theFlow.varOppID; }
   public PageReference getFinishPage(){
      PageReference p = new PageReference('/' + getFinishURL());
      return p; }
}
 
Here is the visualforce page code. It's being called by a custom tab if that matters. Also, all this is being done in my recently refreshed sandbox.
 
<apex:page Controller="MemberPaymentFinishController2" >
<flow:interview name="Manual_Membership_Payment" finishlocation="{!FinishPage}" />
</apex:page>
I am trying to set the Finish Location for my flow to either go to the detail page of the Opp created by the flow or reload the flow. My VF page and Apex controller are below. I'm getting an error: "Invalid Page Redirection.  The page you attempted to access has been blocked due to a redirection to an outside website or an improperly coded link or button."
 
When I hard code the PageReference to ('/' + anExistingOppID), then it redirects to that record just fine. So I know the issue is with my getFinishURL() method. The flow variable that is supposed to be pulled is either the newly created record ID or the URL for the visualforce tab that houses the flow. I added a troubleshooting screen to the flow to see the variable value assignment and it looks correct to me. 
 
Any ideas what I might be missing?
 
Controller:
public class MemberPaymentFinishController {
    public Flow.Interview.Manual_Membership_Payment theFlow {get; set;}
 
    public String getFinishURL() {
    String FinishURL;
      if (theFlow==null) return '';
      else FinishURL = (string) theFlow.getVariableValue('varFinishID');
      return(FinishURL);
      }
 
    public PageReference getFinishPage(){
            PageReference p = new PageReference('/' +  getFinishURL() );
            return p;
}
}
 
VF page
<apex:page Controller="MemberPaymentFinishController" > <br/> <flow:interview name="Manual_Membership_Payment" finishlocation="{!FinishPage}" /> </apex:page>
I'm trying to set the finish location of a flow to the record created in that flow. I've tried setting up the controller a million different ways, but I keep getting an invalid page redirection error when the flow is finished.
 
It seems like, for some reason, my flow is not being instantiated as "theFlow". If I set the page reference to ('/' + 'home/home.jsp') or to a specific opp ID, then the finish location works fine. But any flow variable or anything referenced by theFlow.XXX fails.
 
Debug logs seem to indicate that theFlow is always null. And, if I include interview="{!theFlow}" in the visualforce page, it fails with an internal server error. All flow variables are set to input/output and there is a confirmation screen after the record create.
 
I have no idea what I might be missing. If the apex looks fine, what other user/org/security settings should I double check?
 
public class MemberPaymentFinishController2 {
    public Flow.Interview.Manual_Membership_Payment theFlow {get; set;}
    public String getFinishURL() {
        String FinishURL;
        if (theFlow==null) return '';
        else return theFlow.varOppID; }
   public PageReference getFinishPage(){
      PageReference p = new PageReference('/' + getFinishURL());
      return p; }
}
 
Here is the visualforce page code. It's being called by a custom tab if that matters. Also, all this is being done in my recently refreshed sandbox.
 
<apex:page Controller="MemberPaymentFinishController2" >
<flow:interview name="Manual_Membership_Payment" finishlocation="{!FinishPage}" />
</apex:page>

Hi,

is it possbile to delete custom fields from a custom objects by using the metadata api in eclipse ? 

Currently when I do this, the .object files is refreshed with the previous content.

 

Thanks in advance