function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Karen WheelerKaren Wheeler 

malformed ID in contact upsert

I'm getting a Malformed ID on a contact upsert where the SalesForce ID for the contact is correct. Any suggestions on what I can check to QA this problem? It is not a "one off" - I got this error on 168 records. Thanks for any help. This is a standard Apex upsert.
Arvind KumarArvind Kumar

Hi Wheeler,

While you are Upserting the records,
An ID must be either 15 characters, or 18 characters with a valid case-insensitive extension.
 
In detail
 If you need to match the Records with ID (mostly) while doing this you miss any characteristics of ID like Number of digits and case sensitivity then these type of error will occur.
Please check the formation of ID where you are upserting.

Thanks,

Arvind Kumar

Arvind KumarArvind Kumar
Hi ,

Read the below link,

https://help.salesforce.com/articleView?id=000232388&type=1

Thanks,
Arvind Kumar