• cchenuci
  • 0 Points
  • Member since 2011

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
I'm trying to create a class that creates a task for an email inbound on a Contact level (but it would be really great if I can create it on Opportunity if you can help me figure it out). I'm currently testing this class on Contact and it isn't working. I'm not very well-versed with Apex. What am I doing wrong? Below is the Apex class I have.
global class CreateTaskEmail implements Messaging.InboundEmailHandler {
  global Messaging.InboundEmailResult handleInboundEmail(Messaging.inboundEmail email, 
                                                       Messaging.InboundEnvelope env){
    // Create an InboundEmailResult object for returning the result of the 
    // Apex Email Service
    Messaging.InboundEmailResult result = new Messaging.InboundEmailResult();
    String myPlainText= '';
    // Add the email plain text into the local variable 
    myPlainText = email.plainTextBody;
    // New Task object to be created
    Task[] newTask = new Task[0];
    // Try to look up any contacts based on the email from address
    // If there is more than one contact with the same email address,
    // an exception will be thrown and the catch statement will be called.
    try {
      Contact vCon = [SELECT Id, Name, Email, AccountId
        FROM Contact
        WHERE Email = :email.fromAddress
        LIMIT 1];
      Account a = [SELECT Id, OwnerId FROM Account WHERE Id = :vCon.AccountId];
      // Add a new Task to the contact record we just found above.
      newTask.add(new Task(Description =  myPlainText,
           OwnerId = a.OwnerId,
           Record_Type__c = 'Normal Task',
           Priority = 'Normal',
           Status = 'Completed',
           Subject = 'Email: ' + email.subject,
           Type = 'Email Inbound',
           ActivityDate = System.today(),
           WhoId =  vCon.Id));
     // Insert the new Task 
     insert newTask;    
     System.debug('New Task Object: ' + newTask );   
    // If an exception occurs when the query accesses 
    // the contact record, a QueryException is called.
    // The exception is written to the Apex debug log.
   catch (QueryException e) {
       System.debug('Query Issue: ' + e);
   // Set the result to true. No need to send an email back to the user 
   // with an error message
   result.success = true;
   // Return the result for the Apex Email Service
   return result;
I hope you can help me. Thank you so much!
I am looking to find someone that can do some coding for me to rollup counts from Activities.  I.E
shows amount of times the activity shows as No Answer, Answering Machine etc and also updates the lead status aswell.  

Basic functions to allow me to remove some leads from list view after we have attempted them a few times.

Senior Developer, Salesforce


San Francisco, CA


: Join the Nuehealth team to be part of a silicon-valley start-up that is transforming the future of globalhealth care. Nuehealth powers medical travel through cloud-based solutions and patient management services, allowing more patients to access health care anywhere in the world. Nuehealth is implementing the ‘next generation’ PRM (patient relationship management) solution to assist hospitals, doctors and international patient departments. 


Developer will join a dynamic, international team of experienced technology and business personnel---all working in a fast-paced, fun environment to exceed client expectations.



  • Communicate and collaborate effectively with analysts to design solutions delivered using Force.com technology
  • Implement Force.com solutions with Apex, VisualForce, Workflows and other Force.com technologies as well as appropriate client-side technologies such as dhtml/JQuery/javascript
  • Develop unit-tests and Force.com coverage test classes as required for managed packages
  • Debug and resolve Salesforce.com system-related issues
  • Stay current on Force.com technology changes and collaborate with other developers on best practices
  • Oversee change management processes, bug reports and enhancement requests
  • Providing instructor led training for internal employees to efficiently use our cloud based applications



  • Be wicked smart
  • 3-5+ years’ work experience as a software developer on cloud-based platforms
  • Understanding of commercial software development practices, methodologies, and tools 
  • 2-3 years experience with, and expert knowledge of, Force.com Apex, SOQL, VisualForce, Workflow programming including best practices for end-user customizations (field sets, etc.), bulkification, triggers, web services, imports, etc.
  • Working knowledge of web services, cloud-based APIs and protocols (SOAP, REST, JSON, XML)
  • In-depth knowledge of SalesForce managed packages including end-user customization considerations
  • Solid understanding of web technologies such as dhtml, jQuery and ajax
  • Proficiency in relational database concepts and SQL
  • Excellent analytical and problem solving skills
  • Excellent oral and written communications skills
  • Excellent organization skills
  • Ski, snowboard, mountain bike, run, hike, or any other exciting San Francisco activity!
  • Experience with and competent knowledge of GitHub for version control

Recommended Qualifications

  • SalesForce developer or administrator certification
  • Implementation of a development project for a commercially successful SalesForce-based product

Bonus Qualifications

  • Experience with eGit and/or Eclipse or Force.com IDE
  • SalesForce Administrator Certification and/or expert knowledge of security, sharing, roles, profiles, permissions sets and other accessibility administration