EDIT:
I have overridden the New button in Case object and opening a Visualforce page but if I open the page using preview VFP I'm not getting the error and its happening only when I click on NEW button.
I have looked at this question but did not help me fix the issue i'm having.
Visualforce page:
<apex:page standardcontroller="Case" extensions="caseExt" action="{!redirectPage}">
<apex:form id="form">
......
......
</apex:form>
</apex:page>
Controller:
public PageReference redirectPage()
{
PageReference page = new PageReference('/' + Case.SObjectType.getDescribe().getKeyPrefix() + '/e');
Map<String, String> param = p.getParameters();
param.putAll(ApexPages.currentPage().getParameters());
param.put('nooverride', '1');
page.setRedirect(true);
return page;
}
Error: Invalid Data.
Review all error messages below to correct your data. The page you submitted was invalid for your session. Please click Save again to confirm your change.
Security Controls > Session Settings
this should solve your issue ?ApexPages.currentPage().getParameters()
- using debug logs with system.debug() is how I would check that.