You need to sign in to do that
Don't have an account?
ForceGuru
Notify case owner on case comment creation
Hi,
I want to notify the case owner whenever a new case comment is being added to the case through a Site that has login enabled for customer portal users. Salesforce has a Support Setting for this particular feature which seems to work when we create case comments normally but not through apex code.
Can anyone tell me why this isn't working?
The email services ,assignment rules as well as all standard platform features through apex expect the DML option to set to operate.
This will be implict in case of UI operations inside the salesforce.through API header is not set by default.Hope this helps and you may like to mark answer true to help other users .Thanks
All Answers
You need to use setDML option as true and check.
Thanks for your reply!
Yes. The notification goes out when I use this EmailHeader -
Database.DMLOptions dmlo = new Database.DMLOptions();
dmlo.EmailHeader.triggerUserEmail = true;
Database.insert(oCaseComment, dmlo);
where 'oCaseComment' is the case comment that you add...
But can anyone explain why this has to be set. If the case support setting has been enabled and even when the 'Send Customer Notification' checkbox is not selected for the case comments that you add normally via a standard case comment page, the case owner gets notified.
The email services ,assignment rules as well as all standard platform features through apex expect the DML option to set to operate.
This will be implict in case of UI operations inside the salesforce.through API header is not set by default.Hope this helps and you may like to mark answer true to help other users .Thanks