• Harsh Chandra 23
  • NEWBIE
  • 30 Points
  • Member since 2018

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 5
    Replies
I am having a map<Custom Object , String> type .

I want to iterate over  it so that in a single loop i will get output like

System.debug(key,value);
Hi All,

I have a requirement to send email to campaign members(Contacts) through Apex. Read few blogs where they mentioned if I am sending emails to internal user, contact or lead using "setTargetObjectId" then it won't count under daily limit. So, I have written following code in my dev org to test:
----------------------------------------------------------------------------------
Messaging.Email[] messages = new Messaging.Email[0];
EmailTemplate emt=[Select Id from EmailTemplate where DeveloperName = 'First_Campaign_Email'];

for(Contact objC : lstContact)
{
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    mail.setTargetObjectId(objC.Id);
    mail.setSenderDisplayName('System Admin');
    mail.setTemplateId(emt.Id);
    messages.add(mail);
}
Messaging.sendEmail(messages);

----------------------------------------------------------------------------------

Now, assume lstContact contains 2 contacts and after executing above code when I check workbench for limits, I can see it's reduced to number of email sent. Infact, after sending 15 emails from above code, I started getting "SINGLE_EMAIL_LIMIT_EXCEEDED" exception. Please help what I am missing here and any idea to send bulk(10K) email to internal Contacts?

User-added image

Thanks,
Harsh
I have a Formula field "Renewal Date" whose return type is Date.

I am trying to create one more formula field say "Days Remaining For Renewal" which is nothing but (Renewal Date - Today)

But I'm getting null/blank values in field Days Remaining For Renewal.

Am I doing something wrong? Can you please help me with this?
 
I am having a map<Custom Object , String> type .

I want to iterate over  it so that in a single loop i will get output like

System.debug(key,value);
Hello Team
I am new to Salesforce and i was struck with the Requirement  
Need an formula field of text and display Consultant id and dash seperated with control degits
<9876543210>  -  Control Degit ( two decimul Places)

Regards
NK Sha

Hi, 

I had executed a soql query and put the query output in  a list. Now I want to add a custom coloumn in the list.

Following is the way I am used it in code :

List<CustomObject> mylist = [select id,name,ipaddress from CustomObject];

I want to add a custom coloumn and display this all list in a table 

Can anyone suggest me how to achive this???

Hi All,

I have a requirement to send email to campaign members(Contacts) through Apex. Read few blogs where they mentioned if I am sending emails to internal user, contact or lead using "setTargetObjectId" then it won't count under daily limit. So, I have written following code in my dev org to test:
----------------------------------------------------------------------------------
Messaging.Email[] messages = new Messaging.Email[0];
EmailTemplate emt=[Select Id from EmailTemplate where DeveloperName = 'First_Campaign_Email'];

for(Contact objC : lstContact)
{
    Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
    mail.setTargetObjectId(objC.Id);
    mail.setSenderDisplayName('System Admin');
    mail.setTemplateId(emt.Id);
    messages.add(mail);
}
Messaging.sendEmail(messages);

----------------------------------------------------------------------------------

Now, assume lstContact contains 2 contacts and after executing above code when I check workbench for limits, I can see it's reduced to number of email sent. Infact, after sending 15 emails from above code, I started getting "SINGLE_EMAIL_LIMIT_EXCEEDED" exception. Please help what I am missing here and any idea to send bulk(10K) email to internal Contacts?

User-added image

Thanks,
Harsh