+ Start a Discussion
Saikishore Reddy AengareddySaikishore Reddy Aengareddy 

java.lang.IllegalArgumentException: Illegal view ID gotoOpp. The ID must begin with /

Please help me fix this issue... when I click on the link it is giving me the error. I can use outputlink but here before redirecting it to opportunity page i have to do some operations...


visualforce code:

<apex:pageBlockTable value="{!Opptys}" var="Opp">   

  <apex:column headerValue="Opportunity Name">     

       <apex:commandLink value="{!Opp.name}" action="gotoOpp">         

             <apex:param name="getOpp" value="{!Opp.Id}"/>     



  <apex:column value="{!Opp.StageName}"/>

  <apex:column value="{!Opp.Product_Category__c}"/>



Controller part:

Public PageReference gotoOpp(){

/*some operations to be accomplished here*/

String oppId = System.currentPageReference().getParameters().get('getOpp');

PageReference pageRef = new PageReference('/'+oppId);



Appreciate your time.


Thanks, Sam

Best Answer chosen by Admin (Salesforce Developers) 
Saikishore Reddy AengareddySaikishore Reddy Aengareddy



mistake... figured it out...

<apex:commandLink value="{!Opp.name}" action="{!gotoOpp}">