+ Start a Discussion
Aryan JhaAryan Jha 
global class DailyLeadProcessor implements Schedulable {
    
    global void execute(SchedulableContext ctx) {
        
        
        List<Lead> leads = [SELECT ID, LeadSource FROM Lead where LeadSource = '' LIMIT 200];

        
        for (Lead lead : leads) {
            lead.LeadSource = 'Dreamforce';
        }

        
        update leads;
    }
test class
@isTest
private class DailyLeadProcessorTest {
    
    @isTest
    public static void testDailyLeadProcessor(){

      
        List<Lead> leads = new List<Lead>();
        for (Integer x = 0; x < 200; x++) {
            leads.add(new Lead(lastname='lead number ' + x, company='company number ' + x));
        }
        insert leads;

        Test.startTest();
        String jobId = System.schedule('DailyLeadProcessor', '0 0 12 * * ?', new DailyLeadProcessor());
        Test.stopTest();

   
        List<Lead> listResult = [SELECT ID, LeadSource FROM Lead where LeadSource = 'Dreamforce' LIMIT 200];
        System.assertEquals(200, listResult.size());

    }
}
Thato SitholeThato Sithole 
Hi, all I am currently dealing with the create a validation rule challenge and my error keeps coming back the same it reads:  We can't create a contact by itself (without an associated account). Make sure the validation rule applies ONLY when the contact. Please help, 
Malik CinMalik Cin 
After validating against other posts I continue to get an error in my Process Flow.
Here is the output from the error email where the error occurs.
#############################
SUBMIT FOR APPROVAL: myRule_6_A1
Inputs:
objectId = {!myVariable_current.Id} (0065e0000045ofBAAQ)
comment = null
processDefinitionNameOrId = Opportunity_approval
skipEntryCriteria = false

Error Occurred: This approval request requires the next approver to be determined by the Manager field. This value is empty. Please contact your administrator for more information.

#################################

Here is my user record with manager in the role hierarchy
User-added image

#here are the approval process details
User-added image
User-added image
#here is the process details for the approval step
User-added image
#############################################

At this point I feel there is some corruption in my Org but wanted to reach out to the community to see if I am missing something.

Thank you for your time in advance.

 
renato pisacanerenato pisacane 
I followed this exercise:https://www.youtube.com/watch?v=ocX7hEVt4xo&list=PLrC_ei2_Pv0GKrZr0Guoh-O2jbzzavSOP&index=4

This flow:https://resilient-impala-pp95zs-dev-ed.lightning.force.com/builder_platform_interaction/flowBuilder.app?flowId=301090000005XQNAA2

Why do you respond with this error? User-added image
Carol WalgenwittCarol Walgenwitt 
I am working on the exercice in Navigate and Edit Source Code - I ccreated the Apex Class and was trying to execute using  -  Debug | Open Execute Anonymous Window. as per the instructions - I put in my email address and clicked execute but I do not get any email response showing my execute worked - What did I do wrong? I attached screen shots of my code . Thank youscreen shot of my codescreen shot of my codescreen shot of my code
Carol WalgenwittCarol Walgenwitt 
I am following the exercise to Create Custom Controller Apex Class in Visualforce Basics -  I created the class and page ContactsListWithController - I added all the required code - I have a problem with the new action method - At the end the instructions say "Although the visual appearance remains the same, if you click the First Name and Last Name column headers now, they will change the sort order for the contacts list. Nice!" I do not get First Name or Last Name columns to click - I only get Last Name and when I click nothing happens - I am attaching screenshots of my code - I do not understand what I did wrong. Please check my code so can figure this out. Thank youscreen shot of my codescreen shot of my codescreen shot of my code
ash p 10ash p 10 
The 'Top Laptop Industry' lens does not appear to have the correct query. Please check the requirements and ensure everything is setup correctly.
CogBLOBCogBLOB 
I cannot seem to pass this one simple challenge.  I've attempted it with my regular playground, my current DE Org, and setup a new DE with no  success.  The following message came through each time so I am assuming it's on Salesforce's side: "There was an unexpected error while verifying this challenge. Usually this is due to some pre-existing configuration or code in the challenge Org. We recommend using a new Developer Edition (DE) to check this challenge. If you're using a new DE and seeing this error, please post to the developer forums and reference error id: CXHRJNMD"