• ketan mehta
  • NEWBIE
  • 5 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 8
    Replies
Hi All,
   I am sending a mail by using "Messaging.SingleEmailMessage" entity. I want to a task to be created and available under "Activity History" section of any entity.

Thanks in advance.


Hi,
   I want to check if a record is modified before executing any operation on record in before update trigger. 


Regards,
Ketan
Hi,
   I am tring to send email from trigger and required to log as Activity History for an opportunity. I am setting mail.targetObjectId as opportunityId. I am getting an exeption like : INVALID_TYPE_FOR_OPERATION, Only Users, Contact or Lead allowed for targetObjectId. I read some articles on Google and mentioned that it is not possible. Is there any way to achieve the same?

Thanks in advance.
Ketan



Hi, 
   I am trying to assign an opportunity to a queue as below in a trigger. 
 
list<QueueSobject> queueId = [Select q.SobjectType, q.Id From QueueSobject q where q.Queue.Name =:'test-Queue'];
opp.OwnerId = queueId[0].Id; 

I am getting an exception as below: 
id value of incorrect type: 00G90000001gfFoEAI

Generally i can see all the other ids with length of 15 but the id in  exeption is 18 characters...????

Please guide. 
Hi,
   I want to check if a record is modified before executing any operation on record in before update trigger. 


Regards,
Ketan
Hi,
   I am tring to send email from trigger and required to log as Activity History for an opportunity. I am setting mail.targetObjectId as opportunityId. I am getting an exeption like : INVALID_TYPE_FOR_OPERATION, Only Users, Contact or Lead allowed for targetObjectId. I read some articles on Google and mentioned that it is not possible. Is there any way to achieve the same?

Thanks in advance.
Ketan



Hi, 
   I am trying to assign an opportunity to a queue as below in a trigger. 
 
list<QueueSobject> queueId = [Select q.SobjectType, q.Id From QueueSobject q where q.Queue.Name =:'test-Queue'];
opp.OwnerId = queueId[0].Id; 

I am getting an exception as below: 
id value of incorrect type: 00G90000001gfFoEAI

Generally i can see all the other ids with length of 15 but the id in  exeption is 18 characters...????

Please guide.