• Ram S 49
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi all, I am unable to run the below code in the visualPage. Kindly help me.
I am getting the below error.
"Unknown property 'Project__cStandardController.project' "

Here is the code

<apex:page standardController="Project__c">
    <apex:form>
    <h1>Project Quick Updtae</h1>
        <br/>
        Name : <apex:outputField value="{!project__c.Name}"/>
        <br/>
        Status:<apex:inputField value="{!project__c.Status__c}"/>
        <br/>
        Stage : <apex:inputField value="{!project__c.Stage__c}"/>
        <br />
        End Date : <apex:inputField value="{!project.End_Date__c}"/>
        <br/>
        Invoiced : <apex:inputField value="{!project.Invoiced__c}"/>
        <br/>
        <apex:commandButton value = "Update" action="!save"/>
        
    </apex:form>
    
</apex:page>


 
Hi All,
Need help with below test case

@isTest

private class TestTimecardManager{

@testSetup static void setup()
{
Contact conct = new contact(FirstName='Test', LastName='TestLastName', Phone='4565465789');

insert conct;

Project__c prj = new Project__c(Name ='MyProject');

insert prj;
}

@isTest static void TestInserMethodValid()
{

//code to access contact and project objects

Assignment__c assign = new Assignment__c(Contact__c=conct.Title,Project__c='MyProject',Start_Date__c=Date.parse('01/01/2019'),End_Date__c=Date.parse('10/01/2019'));

}
}


As you see I need to access the contact and project object in TestInserMethodValid() method.

Need your help!.
Method containing custom exception
/*
public static decimal CelsiusToKelvin (decimal degree)
    {
        if(degree<-273.16)
        { result = -273.16;
           throw new InvalidDataException('Value cannot be less than -273.16');
        }
}

*/

My Test method
class TemperatureTest {
@isTest static void testCelsiusToKelvin()
{
//What to do here?
}
}
 
Method containing custom exception
/*
public static decimal CelsiusToKelvin (decimal degree)
    {
        if(degree<-273.16)
        { result = -273.16;
           throw new InvalidDataException('Value cannot be less than -273.16');
        }
}

*/

My Test method
class TemperatureTest {
@isTest static void testCelsiusToKelvin()
{
//What to do here?
}
}
 
I am getting following error when I submit my completed topic for verification

There was an unhandled exception. Please reference ID: UFJJMYUB. Error: Faraday::ResourceNotFound. Message: NOT_FOUND: The requested resource does not exist 
Note: you may run into errors if you've skipped previous steps.
I am having issues with Creating  an Apex class that returns Account objects for the Mapping.net concepts challenge.  I am a VB and Javascript programmer and I can't seem to get the syntax right.   
public class AccountUtils {
    
    public static void accountsByState(String st){
       List<String> accts = [SELECT Id, Name FROM Account WHERE billingState = :st];
 }
  
}
I believe the first part is correct, but I cannot seem to get a return value.  I am confused by the constructors.  I have tried the documentation but I can't get a return value.  Please help.  I need to get this challenge complete.