You need to sign in to do that
Don't have an account?
AJAY
Create a Visualforce page displaying new cases in trail head (challenge task)
Challenge Not yet complete... here's what's wrong:
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [types__c, model__c]: [types__c, model__c]
This is the error i am getting when trying to solve the task in custom controllers,but i am able to perform the task in my friend's org.Can anyone find out the problem out there?
These are the codes i used for apex class and visual force pages.
VF PAGE:
<apex:page controller="NewCaseListController">
<apex:pageBlock title="new Case List" id="cases_list">
<li>
<apex:repeat var="case" value="{!newCases}" rendered="true" id="rCases">
<p><apex:outputLink value="/{!case.ID}">{!case.CaseNumber}</apex:outputLink></p>
</apex:repeat>
</li>
</apex:pageBlock>
</apex:page>
APEX CLASS:
public class NewCaseListController {
public List<Case> getNewCases() {
List<Case> results = [SELECT CaseNumber FROM Case WHERE status='New'];
return results;
}
}
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [types__c, model__c]: [types__c, model__c]
This is the error i am getting when trying to solve the task in custom controllers,but i am able to perform the task in my friend's org.Can anyone find out the problem out there?
These are the codes i used for apex class and visual force pages.
VF PAGE:
<apex:page controller="NewCaseListController">
<apex:pageBlock title="new Case List" id="cases_list">
<li>
<apex:repeat var="case" value="{!newCases}" rendered="true" id="rCases">
<p><apex:outputLink value="/{!case.ID}">{!case.CaseNumber}</apex:outputLink></p>
</apex:repeat>
</li>
</apex:pageBlock>
</apex:page>
APEX CLASS:
public class NewCaseListController {
public List<Case> getNewCases() {
List<Case> results = [SELECT CaseNumber FROM Case WHERE status='New'];
return results;
}
}
Try this,