• Faizan Nusrat 12
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
Hi Team,

How to populate the opty field value in the Task object comments field.Let's say we have a field called  Description,whenerver we are entered in the description field same comments it should be populate in the Task comment field.

How to acheive this one.

Thanks in Advance

Hey guys-

 

I've got a simple messaging class that works great, but I need a solid test class for it.

 

All this is is a class that's called from a javascript custom button that is on the page layout of a custom object record.  When someone click the button, it calls this class, and an email is sent out to the email you can see in the class (I've changed it for anonymity here to 'test@test.com')

 

global class CIFEmails 
{
    WebService static void SendEmailNotification(string id, string accountName) 
    {
    //create a mail object to send a single email.
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();

    //set the email properties
    mail.setToAddresses(new string[] {'test@test.com'});
    mail.setSenderDisplayName('Ping Salesforce');
    mail.setSubject('A CIF Has Just Been Submitted to Contracts & Licensing for: ' + accountName  );
    mail.setHtmlBody('A Customer Information Form has just been Submitted to Contracts & Licensing.'+  
                     'To access the CIF, please go to the record in Salesforce, here: '+ 
                     'https://cs15.salesforce.com/' + id);
    //send the email
    Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail } );
    }
}

 So, I need no test class for my javascript button.  But I do need a test class for the messaging class above.

 

Problem I see is the SF developer documentation is lacking on how to test emails sent via apex.  

 

Anyone have any code I could take a look at that is a GOOD test class for this class?  Doesn't have to be bulkified in this case since the class is only ever called from a custom button.  

 

Thanks a lot for any help anyone can provide

  • September 04, 2013
  • Like
  • 0

Hi all ,

          I want to know what is the exact difference between salesforce.com and Force.com ,

          Can any one help me to know about that?