• AmitSingh69
  • NEWBIE
  • 25 Points
  • Member since 2013

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies

Hello

I have created a DemoObject1 with a couple of fields.

 

Then i am trying to create a VF Page with this content:

 

<apex:page >
<apex:enhancedList type="DemoObject1" height="350"/>
</apex:page>

 

It displays an error that DemoObject1 does not exist.

I have also added a couple of records for DemoObject1 successfully.

Just wondering why we r getting this error.

Please help.

Thanks

Sai

Hello

I have created a DemoObject1 with a couple of fields.

 

Then i am trying to create a VF Page with this content:

 

<apex:page >
<apex:enhancedList type="DemoObject1" height="350"/>
</apex:page>

 

It displays an error that DemoObject1 does not exist.

I have also added a couple of records for DemoObject1 successfully.

Just wondering why we r getting this error.

Please help.

Thanks

Sai

Hello everyone,

 

I have one class on Email Services. Could please any one let me know how to write Test Class for it.

 

I am Pasting my code below:

 

global class CreateTaskfromLeadBox implements Messaging.InboundEmailHandler 
{
  global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email,Messaging.InboundEnvelope env)
  {
    Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
    String myPlainText= '';
    myPlainText = email.plainTextBody;
    Task[] newTask = new Task[0];   
    
    try 
    {
          Lead le= [SELECT Id, Name, Email,ownerId FROM Lead WHERE Email = :email.toAddresses LIMIT 1];
          if(le!=null)
          {
          
          newTask.add(new Task(Description =  myPlainText,
               Priority = 'Normal',
               Status = 'Completed',
               Subject = email.subject,
               ownerid =le.ownerId,
               WhoId =  le.Id));
          insert newTask;
          }
    }
    catch (QueryException e) 
    {
       System.debug('Query Issue: ' + e);
    }
   result.success = true; 
   return result;
  }
}

 

 

 

Thanks,

Anil