0

I am trying to post an Event for a lead in salesforce from an external system I am using the WhatId to link the event to the Lead and I am getting:

MALFORMED_ID message: Related To ID: id value of incorrect type: /00QM000000FL9TFMA1/ errorCode: MALFORMED_ID fields

Here is my body:

{ "WhatId" : "/00QM000000FL9TFMA1/", "Description" : "this is a API Test" }

  • You are supposed to use whoId – codeyinthecloud Oct 15 '18 at 19:43
  • I changed it to WhoId however I am still getting the same error MALFORMED_ID message: Name ID: id value of incorrect type: /00QM000000FL9TFMA1/ errorCode: MALFORMED_ID – Herb Williams Oct 15 '18 at 19:45
  • here is the body "WhoId" : "/00QM000000FL9TFMA1/", "Description" : "this is a API Test" } – Herb Williams Oct 15 '18 at 19:46
  • 3
    remove / from your id – Himanshu Oct 15 '18 at 19:46
3

You are supposed to use WhoId.

WhoId: The WhoId represents a human such as a lead or a contact. WhoIds are polymorphic. Polymorphic means a WhoId is equivalent to a contact’s ID or a lead’s ID. The label is Name ID.

WhatId: The WhatId represents nonhuman objects such as accounts, opportunities, campaigns, cases, or custom objects. WhatIds are polymorphic. Polymorphic means a WhatId is equivalent to the ID of a related object. The label is Related To ID.

Task and Event Objects

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.