function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sathishsfdcsathishsfdc 

Cyclical server-side forwards detected when appending id to the url of the vfpage

Hi 
i am getting the below error while working with the apexpage and visualforce page
 
VFPage name:UserOOO

<apex:page standardController="User" extensions="AbcExtension" action="{!processLinkClick}">
<!-- extensions="newvsold" action="{!pageredir}"> !-->
<apex:form >
        <apex:pageBlock title="My Content" mode="edit">
            <apex:pageBlockButtons >
                <apex:commandLink action="{!save}" value="Save">
              </apex:commandLink>
            </apex:pageBlockButtons>
            <apex:pageBlockSection title="My Content Section" columns="2" >
                <apex:inputField value="{!user.Out_Of_Office__c}" />
                <apex:inputField value="{!User.LastName}" />
                 <apex:inputField value="{!User.LastName}" />
                  <apex:inputField value="{!User.Alias}" />
                    <apex:inputField value="{!User.Email}" /> 
                    <apex:inputField value="{!User.CommunityNickname}" /> 
                    <apex:inputField value="{!User.TimeZoneSidKey}" /> 
                    <apex:inputField value="{!User.LocaleSidKey}" /> 
                    <apex:inputField value="{!User.EmailEncodingKey}" /> 
                    <apex:outputField value="{!User.ProfileID}" /> 
                    <apex:inputField value="{!User.LanguageLocaleKey}" /> 
                    
                     
 
            </apex:pageBlockSection>
          </apex:pageBlock>
    </apex:form>
</apex:page>



class:


public with sharing class AbcExtension{

    private ApexPages.StandardController controller {get; set;}
     public User contact {get;set;}
    public String u {get; set;}

	
	
	

	
    // initialize the controller
    public AbcExtension(ApexPages.StandardController controller) {

      
    }

    // handle the action of the commandlink
    public PageReference processLinkClick() {
    
       u = Userinfo.getUserId();

         system.debug('insiddeee idd ' + u);
      PageReference nextpage = new PageReference('/apex/UserOOO?id='+u);
                return nextpage;
    
  }

}

Basically i am appending the logged in userid to the vfpage so that userid can be passed as parameter and the 
page is edited.


URL error::Cyclical server-side forwards detected: /apex/UserOOO1?id=00590000000iUwAAAU&inline=1 

Thanks
sathish

 
hitesh90hitesh90
Hello Sathish,

Try to use following controller code.

Apex Class:
public with sharing class AbcExtension{
    private ApexPages.StandardController controller {get; set;}
    public User contact {get;set;}
    public String u {get; set;}
    // initialize the controller
    public AbcExtension(ApexPages.StandardController controller) {
    }
    // handle the action of the commandlink
    public PageReference processLinkClick() {
        u = Userinfo.getUserId();
        system.debug('insiddeee idd ' + u);
        PageReference nextpage = new PageReference('/'+u);
        return nextpage;
    }
}


Thank You,
Hitesh Patel
Email :- hiteshpatel.aspl@gmail.com
http://mrjavascript.blogspot.in/
sathishsfdcsathishsfdc
Thanks for the reply hitesh,

Actually i want to navigate to the same page which i created<vfpagename:UserOOO>

I have created a few custom fields on the Userobject and we are giving the user functionality to edit the fields like comments,checkbox present in the user object through visualforce page.