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
UrvikUrvik 

Id value is not valid for the object standard controller

I am getting the following error.
Id value is not valid for the Project_Governance_Form__c standard controller

Here is my code..Could someone please help why I am getting this error?

<apex:page standardController="Project_Governance_Form__c" action="{!URLFOR(CASE(Project_Governance_Form__c.RecordType.Name, 'AIP Form', '/apex/GovForm_Edit_Override_AiP?id={!Project_Governance_Form__c.id}' ,'Commitment', '/apex/GovForm_Edit_Override_Commitment?id={!Project_Governance_Form__c.Id}', 'Commitment / FMA', '/apex/GovForm_Edit_Override_FMA_Commit', '/apex/GovForm_Edit_Override_FMA'))}" >
    
<apex:variable value="{!Project_Governance_Form__c.RecordType.Name}" var="recTypeName"/>
</apex:page>


KevinPKevinP
Urvik,

It looks all the world like you're action attribute's case statement is missing the id parameter for the last record type and the default. I'm guessing that your "id value" is not valid error, may come from the lack of an Id all together.
UrvikUrvik
Hi Kevin,
I put the id parameter for the last record type but still getting the same error.
KevinPKevinP
you'll need it not only for the last record type, but also for the *default* clause in your case statment.