• Swapnil Khambayat
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,
I want to update TaskRay Project record based on Case record.
I have created process builder to update Taskray project base on changes in Case Record and its working fine.
If i tried to update Owner field on taskRay project I am getting error.
On Case record, Owner field may have single owner or Queue. Based on this I want to update Project record's owner field.
Please suggest.

Thanks,
Swapnil
HI All,

I am very confused and stuck at the moment. I have the following Apex code being fired in a trigger:
 
private static void sendMercuryMotorOrderEmail( Set<Id> dealerOrderIds )
  {
    String[] ccAddrs = new List<String>{
      'dealercare@legendboats.com'
    };
    //email template we want to use
    String templateId = Legend_Settings__c.getOrgDefaults().Mercury_Order_Email_Template_Id__c;
    //Static contact we want to email
    Id contactId = Legend_Settings__c.getOrgDefaults().Mercury_Contact_Id__c;
    List<Messaging.SingleEmailMessage> msgList= new List<Messaging.SingleEmailMessage>();
    for( Id doId : dealerOrderIds )
    {
      Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
      mail.setTargetObjectId(contactId);
      mail.setWhatId( doId );
      mail.setTemplateId( templateId );
      mail.setCcAddresses( ccAddrs );
      mail.setSaveAsActivity(true);
      msgList.add(mail);
    }
    Messaging.sendEmail(msgList);
  }

In my sandbox environment ( which was refreshed from production very recently and none of this code has changed ) the email is sent as expected and the Email shows up in the Activity History on the record details page in Lightning.  In production the email is sent correctly but the nothing ever shows in the Activity History.  Furthor more ( probably the reason for no Activity History ) in Production no record in the Email Message table is being created, but in Sandbox there is.

I have check all permissions and settings in Production I can think of ( yes Track Activities is enabled on the object ).  Is there anything I am possibly missing?  My users really want this to show on the activity timeline and I am just completely confused.

Thanks a alot for any assistance.