• Orquidea Perez 5
  • NEWBIE
  • 10 Points
  • Member since 2014
  • Salesforce Administrator


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 5
    Replies
I am working on the Creating & Using Custom Controllers module. I have tried this a variety of ways and I am still geting a "Challenge not yet complete....here's what's wrong:

"The outputLink component is not binding to the ID of a case"

Here is my code for the page:

<apex:page controller="NewCaseListController">
    <apex:repeat value="{!newCases}" var="case">
        <apex:outputLink value="/{!case.Id}">{!case.CaseNumber}</apex:outputLink>
    </apex:repeat> 
</apex:page>

And here is my code for the Apex Class:

Public class NewCaseListController {

    public String getCase() {
        return null;
    }

List<Case> results = new List<Case>();


private String sortOrder = 'CaseNumber';
public List<Case> getNewCases() {
    
    results = [SELECT Id, CaseNumber FROM Case WHERE Status = 'New'];

    return results;
    }
}

Feedback/Help :-)

Thank you, 

Orchid 


 
I am getting the following error message:

"Challenge not yet complete...here's what's wrong:
The page does not include a apex:inputField Component bound to the contact email.

Here is the code I wrote in the Dev Console, I don't believe there are errors, but if anyone can help, would be appreciated :-)


<apex:page standardController="Contact">
    <apex:form >
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection columns="1">
    
        <apex:inputField value="{!Contact.FirstName}"/>
        <apex:inputField value="{!Contact.LastName}"/>
        <apex:inputField value="{!Contact.Owner.Email}"/>
            
            </apex:pageBlockSection>       
        
            <apex:pageBlockButtons >
            <apex:commandButton action="{! save }" value="Save"/>
              </apex:pageBlockButtons> 
            </apex:pageBlock>
    </apex:form>
</apex:page>


 
Is this  Principal__c  *  EXP( Interest_Rate__c  * (YEAR(TODAY()) - VALUE(YearStarted))) formula supposed to be in a separate field , or appended to the IF(Principal__c < 10000, 0.02, IF(Principal__c >= 10000 &&
 Principal__c < 100000, 0.03, 0.04)) formula. I feel that the directions aren't clear.  Is all of this in one formula field or two. Thanks
I am working on the Creating & Using Custom Controllers module. I have tried this a variety of ways and I am still geting a "Challenge not yet complete....here's what's wrong:

"The outputLink component is not binding to the ID of a case"

Here is my code for the page:

<apex:page controller="NewCaseListController">
    <apex:repeat value="{!newCases}" var="case">
        <apex:outputLink value="/{!case.Id}">{!case.CaseNumber}</apex:outputLink>
    </apex:repeat> 
</apex:page>

And here is my code for the Apex Class:

Public class NewCaseListController {

    public String getCase() {
        return null;
    }

List<Case> results = new List<Case>();


private String sortOrder = 'CaseNumber';
public List<Case> getNewCases() {
    
    results = [SELECT Id, CaseNumber FROM Case WHERE Status = 'New'];

    return results;
    }
}

Feedback/Help :-)

Thank you, 

Orchid 


 
I am getting the following error message:

"Challenge not yet complete...here's what's wrong:
The page does not include a apex:inputField Component bound to the contact email.

Here is the code I wrote in the Dev Console, I don't believe there are errors, but if anyone can help, would be appreciated :-)


<apex:page standardController="Contact">
    <apex:form >
        <apex:pageBlock title="Edit Contact">
            <apex:pageBlockSection columns="1">
    
        <apex:inputField value="{!Contact.FirstName}"/>
        <apex:inputField value="{!Contact.LastName}"/>
        <apex:inputField value="{!Contact.Owner.Email}"/>
            
            </apex:pageBlockSection>       
        
            <apex:pageBlockButtons >
            <apex:commandButton action="{! save }" value="Save"/>
              </apex:pageBlockButtons> 
            </apex:pageBlock>
    </apex:form>
</apex:page>


 
I created the sendEmail class as was able to send/receive the email as the instructions indicated. However, under the section "Call Static Method" I ran into an error. 

This instructions read: 
          " In the Developer Console, find the open tab for the EmailManager class and modify the first line of the sendMail() method definition to the following (the only change is the added static keyword.)
 
                   public static void sendMail(String address, String subject, String body) {

                   Save the class by pressing Ctrl+S.  "

When I try to save, I get: 
FIELD_INTEGRITY_ERROR: 
Failed to create createContainerMember for containerId=undefined: null is not a valid containerId.

Here are the first few lines of the class (with the addition of the word 'static' per instructions)

public class EmailManager {

    // Public method
    public static void sendMail(String address, String subject, String body) {
        // Create an email message object.....

Further, the page is now in a perminant 'saving' mode under the file menu.   Thanks for any help.