You need to sign in to do that
Don't have an account?
Viliam Lomidrevo
sendEmailmessage() -> Parent Case required
When sending email message using the sendEmailMessage() method, I am getting the INVALID_OPERATION error Reason is: 'Parent Case required'.
Is it possible to send EmailMessages with empty (or not set) Parent Case field?
Thanks
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_email_outbound_single.htm
Thanks for your answer.
I am aware of the Single or Mass EmailMessage object that can be sent using the API's sendEmail() method.
However my question is related specifically to sendEmailMessage() method, which is supposed to send an email just by passing the ID of existing EmailMessage record
Yes that is true,
EmailMessage must have the case id set + the status of the email must be 'Draft'. Problem is that using SOAP API it is not possible to create EmailMessage object that has the parent case Id set and in the same time the status of that email is Draft. result is INVALID_OPERATION
So if you want to create a new EmailMessage and immediately send it using sendEmailMessage() web method, you can't do it.
Do you think this is a bug or it was intended to work like this?