+ Start a Discussion
John NeilanJohn Neilan 

Flow Error From VF Page


I have a flow in place that is assigned to a custom List Button on the Opportunity object. It is meant to create an Opportunity when the custom button is pressed the related list on the Account. The flow requires some fields to be completed on the Account before the Opportunity can be created (i.e., Industry, Website). I also want the user to be re-directed to the Opportunity Products page upon creation of the Opportunity. In order to do this, I created a custom VF page and controller and utilized the Flow component in the VF page. However, when I click on the custom button, I get the error:

Error: Unable to Access Page The value of the "id" parameter contains a character that is not allowed or the value exceeds the maximum allowed length. Remove the character from the parameter value or reduce the value length and resubmit. If the error still persists, report it to our Customer Support team. Provide the URL of the page you were requesting as well as any other related information.

Does anyone know I am getting this error?

VF Controller:
public class OpptyFlowController {

  public ApexPages.StandardSetController stdControl{get; set;}
    public OpptyFlowController(ApexPages.StandardSetController controller) {
      stdControl = controller;

  public Flow.Interview.Create_Opportunity_w_Parent_Fixed OppFlow { get; set; }

    public String getOppID() {
      if (OppFlow==null) return '';
      else return (Id)OppFlow.getVariableValue('OpportunityId');

  public PageReference getOID(){
    PageReference p = new PageReference('/p/opp/SelectSearch?addTo=' + getOppID() + '&retURL=%2F' + getOppID());
  return p;

VF Page:
<apex:page standardController="Account" tabStyle="Account" Extensions="OpptyFlowController" recordSetVar="opportunities">
    <apex:outputField value="{!Account.Id}"/>
    <flow:interview name="Create_Opportunity_w_Parent_Fixed" interview="{!OppFlow}" finishLocation="{!OID}">-
      <apex:param name="AccountId" value="{!Account.Id}"/>
      <apex:param name="AccountWebsite" value="{!Account.Website}"/>
      <apex:param name="AccountIndustry" value="{!Account.Industry}"/>
      <apex:param name="AccountCountry" value="{!Account.BillingCountry}"/>
      <apex:param name="AccountSubIndustry" value="{!Account.Sub_Industry__c}"/>


ShashankShashank (Salesforce Developers) 
If you are still facing this issue, please see if the explanation provided here helps: http://salesforce.stackexchange.com/questions/53542/the-value-of-the-id-parameter-contains-a-character-that-is-not-allowed-or-the