Working in an org where they are still using the customer portal and are not ready to switch to communities. I have enabled the setting in the Support settings for the cases, as well as the template in the settings for the customer portal as shown below

In Case Support Settings

enter image description here

In Customer Portal Settings

enter image description here

Is there something I am missing? If a user adds a comment internally to a case, whether private or public, the case owner is notified. Its only when a customer adds a case comment through the portal, no notification is sent to the case owner.

I know I can likely bypass this and manually create a workflow to send a notification, but I shouldn't have to and I really want to understand why the native functionality isn't working here.

I am much more of a developer in Salesforce then an admin, so don't know if I am missing some setting somewhere or do not have this configured correctly. Hoping someone see's the error I am making.


Per @Ralph's answer, I added some DML options to the Case Comment prior to it's insertion via Apex.

Database.DMLOptions opts = new Database.DMLOptions();
opts.EmailHeader.triggerAutoResponseEmail = true;
opts.EmailHeader.triggerOtherEmail = true;
opts.EmailHeader.triggerUserEmail = true;

insert myComment;

This sends an alert, but it send the very basic plain text system email message seen below

enter image description here

Instead of using the template that is specified in the customer portal settings

enter image description here

Anyone know why this is happening?

1 Answer 1


Two possible issues. If you're working in a sandbox it's possible that non-system emails are disabled. Go to System->Email Administration->Deliverability to check this. Second, if the case comments are created via the API or APEX you'll need to ensure the DMLOptions email header is enabled when inserting the new case comment.

Failing that you may need to contact customer support to troubleshoot further.

  • 1
    It is in production, so it's not a sandbox email issue, but that's a good thing to check on the DML options email header, as it is being inserted via apex. I will try it out and let your know. Commented Nov 7, 2013 at 1:01
  • Interesting find. So adding the DML options to the case comment prior to insert did solve the issue, somewhat. Now an alert is being sent, but its a very simple system email that is sent, not the template that is specified in the portal settings. this is better than nothing, as they are at least getting an alert, by why is it not using the template specified and sending the system email instead I wonder? Commented Nov 7, 2013 at 16:29
  • That is strange. I think the idea with DML options is that if your inserting stuff via the API you're doing a data migration and you don't want the regular notifications. That seems very strange that it would then ignore the portal settings. My only guess would be that since it's a portal settings it might not apply to case comments inserted by a non-portal user? (In which case a more generic setting may determine the template) Commented Nov 7, 2013 at 16:57
  • I agree its odd. I have used a workflow to send the appropriate template as a workaround, so it works as it should. I just find this very odd and don't understand why its happening. Maybe you are right about inserting via Apex, as it runs in system node, so maybe it doesn't send with the template unless its a portal user? I don't know, still strange though. thanks for the help Commented Nov 7, 2013 at 17:04
  • I was thinking more along the lines of the running user (i.e. if it's a batch process running as a system admin, rather than as customer portal user). If there is not portal user the database may not have a way to determine which portal settings to use. It's a weak argument, but a case with support could probably verify it. Commented Nov 7, 2013 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .