• Lujan Galvano
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hello,
I need help!
I have the folowing error when I tryied to fill a field from a visualforce page. This visualforce page call a flow.
The error is:
Se produjo este error: INVALID_FIELD_FOR_INSERT_UPDATE: Encuesta__c: bad field names on insert/update call: ImpactoAFS__c.
The field ImpactoAFS__c is a long text area.

Please Help me!
Thanks!! 
Hello!
I developed an apex class for read cases and send email if meet the criteria. It has 100% code coverage, but when I send the test class to production I have the following error:
"Invalid type: NotifCasosSchedule"

This is the test class:
@isTest
public class NotifCasosScheduleTest {
    public static testmethod void test1(){
        Test.startTest();
       
        ID Owner = '00540000004ADl6';
        Case ccs = new Case();
        ccs.Area__c = 'Sistemas';
        ccs.Tipo_de_Caso__c = 'Soporte Salesforce';
        ccs.OwnerId = Owner;
        ccs.Subject = 'test';
        ccs.Description = 'Testeo';
        ccs.CreatedDate__c = System.Date.today()-3;
        insert ccs;
        
        String CRON_EXP = '0 0 0 3 9 ? 2022';
        String jobId = System.schedule('NotifCasosScheduleTest', CRON_EXP, new  NotifCasosSchedule());
        CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId];
        System.assertEquals(0, ct.TimesTriggered);
        System.assertEquals('2022-09-03 00:00:00', String.valueOf(ct.NextFireTime));
        Test.stopTest();

               }
}

any help serves

Thanks!!
Best Regards!!
    
 
Hello!
I developed an apex class for read cases and send email if meet the criteria. It has 100% code coverage, but when I send the test class to production I have the following error:
"Invalid type: NotifCasosSchedule"

This is the test class:
@isTest
public class NotifCasosScheduleTest {
    public static testmethod void test1(){
        Test.startTest();
       
        ID Owner = '00540000004ADl6';
        Case ccs = new Case();
        ccs.Area__c = 'Sistemas';
        ccs.Tipo_de_Caso__c = 'Soporte Salesforce';
        ccs.OwnerId = Owner;
        ccs.Subject = 'test';
        ccs.Description = 'Testeo';
        ccs.CreatedDate__c = System.Date.today()-3;
        insert ccs;
        
        String CRON_EXP = '0 0 0 3 9 ? 2022';
        String jobId = System.schedule('NotifCasosScheduleTest', CRON_EXP, new  NotifCasosSchedule());
        CronTrigger ct = [SELECT Id, CronExpression, TimesTriggered, NextFireTime FROM CronTrigger WHERE id = :jobId];
        System.assertEquals(0, ct.TimesTriggered);
        System.assertEquals('2022-09-03 00:00:00', String.valueOf(ct.NextFireTime));
        Test.stopTest();

               }
}

any help serves

Thanks!!
Best Regards!!