You need to sign in to do that
Don't have an account?
Justin Bernard Rafael Cosio
Content cannot be displayed: Id value 00128000002k7Df is not valid for the Core_Values__c standard controller
I have an issue here. I was able to add all the necessary radio buttons on the VisualForce page for a Core Values object. When I go to the page, it shows: Content cannot be displayed: Id value 00128000002k7Df is not valid for the Core_Values__c standard controller.
Here's the code.
<apex:page standardController="Core_Values__c">
<style type="text/css">
input[type="radio"]:checked {
background-image: url("http://throwingthebowlines.com/wp-content/uploads/2013/12/checkbox.png");
}
input[type="radio"]:checked+label{ color:red; font-weight:bold; }
</style>
<apex:form >
<apex:pageBlock >
<apex:pageblocksection columns="1" title="Core Values">
<apex:selectRadio label="HSE" value="{!Core_Values__c.HSE__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Professionalism & Integrity" value="{!Core_Values__c.Professionalism_Integrity__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Quality / Accuracy" value="{!Core_Values__c.Quality_Accuracy__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Technology / Innovation" value="{!Core_Values__c.Technology_Innovation__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Timeliness" value="{!Core_Values__c.Timeliness__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Value for Money" value="{!Core_Values__c.Value_for_Money__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
</apex:pageblocksection>
</apex:pageBlock>
</apex:form>
</apex:page>
Here's the code.
<apex:page standardController="Core_Values__c">
<style type="text/css">
input[type="radio"]:checked {
background-image: url("http://throwingthebowlines.com/wp-content/uploads/2013/12/checkbox.png");
}
input[type="radio"]:checked+label{ color:red; font-weight:bold; }
</style>
<apex:form >
<apex:pageBlock >
<apex:pageblocksection columns="1" title="Core Values">
<apex:selectRadio label="HSE" value="{!Core_Values__c.HSE__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Professionalism & Integrity" value="{!Core_Values__c.Professionalism_Integrity__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Quality / Accuracy" value="{!Core_Values__c.Quality_Accuracy__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Technology / Innovation" value="{!Core_Values__c.Technology_Innovation__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Timeliness" value="{!Core_Values__c.Timeliness__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
<apex:selectRadio label="Value for Money" value="{!Core_Values__c.Value_for_Money__c}" border="1">
<apex:selectOption itemLabel="Excellent" itemValue="6"/>
<apex:selectOption itemLabel="Very Good" itemValue="5"/>
<apex:selectOption itemLabel="Good" itemValue="4"/>
<apex:selectOption itemLabel="Average" itemValue="3"/>
<apex:selectOption itemLabel="Fair" itemValue="2"/>
<apex:selectOption itemLabel="Poor" itemValue="1"/>
</apex:selectRadio>
</apex:pageblocksection>
</apex:pageBlock>
</apex:form>
</apex:page>
you have added standardController="Core_Values__c" it means it will point to Core_values__c object record but you are passing Account object record 00128000002k7Df in id parameter. Please pass a record id of Core_values__c object in id parameter.
wrong one
correct one
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.
All Answers
you have added standardController="Core_Values__c" it means it will point to Core_values__c object record but you are passing Account object record 00128000002k7Df in id parameter. Please pass a record id of Core_values__c object in id parameter.
wrong one
correct one
Thanks,
Himanshu
Salesforce Certified Developer | Administrator | Service Cloud Consultant
P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.