• Kourt Neyra
  • NEWBIE
  • 10 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Hi
I have a scheduled class in my org that is used to delete records.
We have a field "Policy End Date" and daily, we need to delete the records where Policy end date is less than today.
The issue is that it is working fine the first day that we schedule it, but the following days it is not deleting the records.
someone know how to fix it?
global class BorrarAsegurados implements Schedulable{
    global void execute(schedulablecontext SC){
        List<Enrollee__c> Asegurados = [select id from Enrollee__c where Policy_End_Date__c <= Yesterday ];
        if(!Asegurados.isEmpty())
            delete Asegurados;
    }

}

 
Hi, I have an apex scheduled class and i want to deploy it to production, but it has a 0% code coverage, how can i write a test class for it? This is the code:
 
global class BorrarAsegurados implements Schedulable{
    global void execute(schedulablecontext SC){
        List<Enrollee__c> Asegurados = [select id from Enrollee__c where Policy_End_Date__c <= Yesterday ];
        if(!Asegurados.isEmpty())
            delete Asegurados;
    }

}

 
Hello,

We have received a heads up from Salesforce team that NA4 instance is going under refresh and whereever we have hardcoded references, we need to update them to make our org ready for the refresh.

I found that NA4 is being referrred in -
1) Flows- Purpose of the flow is to verify if a Contact already exists during creation and display an error message on the screen along with detail link of the contact. How should I take care of na4 references in the detail link to be updated?
2) Under Email-to-Case for one of the Email2Case Support group have Email Services Address references NA4.  does this requires any change? I believe as the routing email address already verified no action required. Kindly Clarify.

Please help me to sort this out.

Thank you.
Hi
I have a scheduled class in my org that is used to delete records.
We have a field "Policy End Date" and daily, we need to delete the records where Policy end date is less than today.
The issue is that it is working fine the first day that we schedule it, but the following days it is not deleting the records.
someone know how to fix it?
global class BorrarAsegurados implements Schedulable{
    global void execute(schedulablecontext SC){
        List<Enrollee__c> Asegurados = [select id from Enrollee__c where Policy_End_Date__c <= Yesterday ];
        if(!Asegurados.isEmpty())
            delete Asegurados;
    }

}

 
Hi, I have an apex scheduled class and i want to deploy it to production, but it has a 0% code coverage, how can i write a test class for it? This is the code:
 
global class BorrarAsegurados implements Schedulable{
    global void execute(schedulablecontext SC){
        List<Enrollee__c> Asegurados = [select id from Enrollee__c where Policy_End_Date__c <= Yesterday ];
        if(!Asegurados.isEmpty())
            delete Asegurados;
    }

}