• Jakub Oracki
  • NEWBIE
  • 25 Points
  • Member since 2014

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I am getting te following error in my code

Error: Compile Error: IN operator must be used with an iterable expression at line 34 column 116



below is my test class code


@isTest
public class AF_processETBouncebacks{
  
    testMethod static void testProcessBouncebacksTrigger() {
        Test.startTest();
        // Create a few records to test various scenarios
      
      
        contact con = new contact();
        con.LastName ='c';
        insert con;
    
      
        et4ae5__IndividualEmailResult__c emailresult = new et4ae5__IndividualEmailResult__c();
        emailresult.et4ae5__Contact__c =con.id;
        emailresult.et4ae5__Contact__r.AccountId='1803 C/O DLRSHIP LIQUIDATIONS';
        emailresult.et4ae5__DateBounced__c =date.today();
        emailresult.et4ae5__HardBounce__c = true;
        emailresult.et4ae5__Opened__c = true;
        insert emailresult;
      
      
         /*Task tsk = new Task();
         tsk.WhoId =emailresult;
         //tsk.OwnerId = aeMap.get(acId);
         tsk.Subject = 'Bounceback Correction';
         tsk.ActivityDate = date.today()+5;
         //tsk.CreatedById = System.Label.ExactTarget_Admin;
         tsk.Description = 'There was a bounceback for this Contact. The email send id : ';
         insert tsk;
*/
        Test.stopTest();
        Task createdTasks = [Select Id,WhoId ,OwnerId ,Subject ,ActivityDate,Description  from Task Where WhoId IN:con.id];

        // verify if target tasks etc are created successfully
       System.assert(createdTasks);
    }
 
}


kindly help me


Thanks in Advance
I am getting te following error in my code

Error: Compile Error: IN operator must be used with an iterable expression at line 34 column 116



below is my test class code


@isTest
public class AF_processETBouncebacks{
  
    testMethod static void testProcessBouncebacksTrigger() {
        Test.startTest();
        // Create a few records to test various scenarios
      
      
        contact con = new contact();
        con.LastName ='c';
        insert con;
    
      
        et4ae5__IndividualEmailResult__c emailresult = new et4ae5__IndividualEmailResult__c();
        emailresult.et4ae5__Contact__c =con.id;
        emailresult.et4ae5__Contact__r.AccountId='1803 C/O DLRSHIP LIQUIDATIONS';
        emailresult.et4ae5__DateBounced__c =date.today();
        emailresult.et4ae5__HardBounce__c = true;
        emailresult.et4ae5__Opened__c = true;
        insert emailresult;
      
      
         /*Task tsk = new Task();
         tsk.WhoId =emailresult;
         //tsk.OwnerId = aeMap.get(acId);
         tsk.Subject = 'Bounceback Correction';
         tsk.ActivityDate = date.today()+5;
         //tsk.CreatedById = System.Label.ExactTarget_Admin;
         tsk.Description = 'There was a bounceback for this Contact. The email send id : ';
         insert tsk;
*/
        Test.stopTest();
        Task createdTasks = [Select Id,WhoId ,OwnerId ,Subject ,ActivityDate,Description  from Task Where WhoId IN:con.id];

        // verify if target tasks etc are created successfully
       System.assert(createdTasks);
    }
 
}


kindly help me


Thanks in Advance

Hi,

 

I want to lock particular Record on some condition.

 

Ex: I will include one custom field(check box) in Opportunity as "Lock". If this is checked for any Opportunity, then that Opportunity should not be accessible by any other group (Ex: Sales, Marketing).

How can I achieve this?

 

Thanks for any help.....