• Viliam Lomidrevo
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies

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

Hi,

When creating the EmailMessage object using SOAP API, when I provide the PartnerID value, I get the following error:

{"hasErrors":true,"results":[{"result":[{"errorCode":"INVALID_OPERATION","message":"operation is not allowed"}],"statusCode":400}]}

The SOAP request sent to SF is:

POST https://eu11.salesforce.com/services/data/v38.0/composite/batch HTTP/1.1
Authorization: Bearer 00D0Y000000p9Bk!AQQAQBCmNW7qKOcqUQOCJG_6pzd2B8rvxxxxtZ.Nz.Ox8dyLXU0xEOXPA.Szo1eUDKxlP.RY5OZCg1w7poiT9RENvmYjf
Content-Type: application/json
Host: eu11.salesforce.com
Content-Length: 339
Expect: 100-continue
Accept-Encoding: gzip, deflate

{"batchRequests" : [{ "method": "POST","url": "v38.0/sobjects/EmailMessage","richInput": {
"FromAddress":"vilo.lomidrevo@gmail.com",
"MessageDate":"2016-12-07T16:00:00.0000000Z",
"ParentId":"5000Y000001wHitQAE",
"resco_contentstatus__c":"473220003",
"Status":"5",
"Subject":"Email Mesage 21",
"ToAddress":"rohel@resco.net"
}}]}

When the ParentID is omittedteh EmailMessage record is created sucessfully.

Am I missing something here? What is the cause of the error I am getting?

Thank you

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