• mukeshrathod
  • NEWBIE
  • 0 Points
  • Member since 2010

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

Hi all,

 

I created a trigger that will update the Event owner to the owner of the Lead whenever the Lead owner is changed.  We have a process where we assign a Lead to a queue with a scheduled appointment(Event) already assigned to an admin.  

 

The trigger will only fire if the Lead owner does not equal a "Queue" owner.

 

I am getting an error when:

 

 

  1. There is more than one Event on the Lead
  2. If there are no Events on the Lead
trigger ownerupdate on Lead (after Update) {

List<Event> aplist = new List<Event>();

for(Lead t : Trigger.new){

if (
(t.LeadSource == 'Telemarketing')  
&&
(t.Owner_Convert_Queue__c == NULL)
)

{Event ap = [Select WhoId, Whatid, OwnerId from Event where WhoId = :t.Id];

            
ap.OwnerId = t.OwnerId;

aplist.add( ap );

}}
update aplist;
}

 

Any help would be appreciated.

 

Thanks,

Alex

 

Hi,

 

This may be a stupid question, but I'm having a hard time doing anything with the files generated by Axis2.

 

I made sure to use the xmlbeans databinding option when I generated them.

 

I ended up with a folder that had 2 subfolders (resources and src) and a build.xml file. Do I just place all of these in the project root? I've tried this and Eclipse freaks out and throws a bunch of errors, saying all of the class names are invalid, etc (even after cleaning the project).

 

I've also tried just placing the folders within src into the project src and that fails as well.

 

There is no mention of the specifics of this in documentation.

 

Thanks