• JorgeLCaceres
  • NEWBIE
  • 0 Points
  • Member since 2009
  • Ninja Developer
  • salesforce

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

For some reason, when using the below trigger (which was provided in part by the salesforce developer pilot program), it will not invoke the inactive assignment rule which is called out. The only way we were able to get it to work is if we specify "after insert", which completely defeats the purpose of what this trigger is supposed to do.

 

Does anyone see any holes?

 

 

trigger Updatelead1 on Lead (after update) { //First get all the updated leads List<Lead> uptdLeads = new List<Lead>(); // Check Each Lead's owner, Invoke assignement rule if the owner is "00G50000000z37R" for(Lead ul : uptdLeads ){ if(ul.OwnerId == '00G50000000z37REAQ' ){ System.debug('$$$$Owner Matched'); database.DMLOptions dmo = new database.DMLOptions(); dmo.AssignmentRuleHeader.assignmentRuleID ='01Q500000006mKtEAI'; ul.setOptions(dmo); uptdLeads.add(ul); } } if(!uptdLeads.isEmpty()) Database.update(uptdLeads)

 

 

 

I have some apex triggers and classes which involve sending mails outside salesforce.

I have been getting this error today - this is existing code.

 

I do see that salesforce doc has this

 

All mass email and single email messages sent with this call count against the daily mass mail limit of the sending organization. When the daily mass mail limit for the organization is reached, all sendEmail() calls through the API are rejected, and the user receives a MASS_MAIL_LIMIT_EXCEEDED error code. However, single email messages sent through the application are still allowed.

 

How do I get around this?

 

Any clues ? Thanks

Message Edited by MDXHiker on 10-21-2009 10:38 AM

We are looking for an experienced Salesforce Consultant (Certification a Plus but not a must). The candidate must be local (Madrid / Spain) as this is for a customer facing role. Native Spanish speaker. If you are interested drop me a note and I will provide more details.

 

Full Time or Contractor irrespective.

 

Regards,

 

J