You need to sign in to do that
Don't have an account?
Sanjay92062
Visualforce Page redirecting from different Record Types.
Hi,
I have a custom object with two record types. Now i am trying to redirect Visualforce page for one record type.
Below is my controller code :
Cyclical server-side forwards detected: /apex/MPage
From internet,i added,
newPage.getParameters().put('nooverride', '2');
as well.But i am facing same issue.
Please help me.
Thank you.
I have a custom object with two record types. Now i am trying to redirect Visualforce page for one record type.
Below is my controller code :
public PageReference CaseRedirect() { PageReference newPage; if(m.RecordTypeId =='0000111111'){ newPage = new PageReference('/apex/MPage'); newPage.getParameters().put('nooverride', '2'); return newPage; } else{ PageReference pageRef2 = new PageReference('https://test.com/new?count=5&nooverride=1&recordTypeId=00002222'); return pageRef2; } }Else Condition working as expected, but whenever i selected corrected record type it shows :
Cyclical server-side forwards detected: /apex/MPage
From internet,i added,
newPage.getParameters().put('nooverride', '2');
as well.But i am facing same issue.
Please help me.
Thank you.
All Answers
Greetings!
This error occurs if you the page you are referencing here is rediected to the same page on which you are currently.
So,I would suggest you to check if you are using the correct page or not.
Kindly mark it as best answer if it helps so that it can help others in the future.
Warm Regards,
Shirisha Pathuri
Thank you for your reply.
I am using the correct page only. I need to redirect based on Record Type.
I have two record types(A&B) and I wrote a Visualforce page for Record Type A.Whenever i selected Record A from the custom object New button, I want to redirect to A visualforce page.
Whenever selected B record type, it will be the default page.
Please help me.