You need to sign in to do that
Don't have an account?
Bhakti Gujarathi
Malformed_Id error while updating a record in testclass
i have writen a test class. in which i have created the test data..now one of the method in the controller for which i have written the test class updates the record created previously. but on the UPDATE statement igive me error: Update failed: first Error Malformed_Id incorrect Id Type.
However to give you some hints, this usually happens when we sometimes add such codes:
Contact con = new Contact();
con.AccountId = '123456'; // this is not right, 123456 is not a valid id for Accounts
con.LastName = 'test';
insert con;
So check in your code if there are any reference fields that have invalid id assigned.