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
Everton CP7Everton CP7 

Contact/Primary Id : Value Type ID incorrect: 001J000000UDkLeIAL

Hi there,

 

I created a VF page on task.

It works fine but when I will create a task related to a case and in this case have a "Personal Account" this error appears.

 

The ID in there, it's the ID from my personal account (WhoID).

 

Does anyone know about this error?

 

Thanks !

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

If it doesn't give you that automatically, it sounds like you'll need to create/enhance your controller to retrieve the account record and populate the whoid with the associated contact id.

All Answers

bob_buzzardbob_buzzard

The whoid can't contain an account id - it can only contain a lead or a contact id.  By "Personal Account" do you mean that you have enabled person accounts?  If so, I think you'll have to pull the contact id from the person account record and use that.

Everton CP7Everton CP7

Thanks Bob!

 

That's right, I have enabled them, because in the end it's our final client.

 

Some fields in there belongs to "Contact".

"WhoID" pull the "Name" of a my "Contact". Therefore, pull the name of my "Person Account".

 

If I have to pull this contact ID. Should you tell me how I do this?

 

This doesn't work only in VF page. If I use standard layout, it works.

 

Thanks again Bob!

bob_buzzardbob_buzzard

If it doesn't give you that automatically, it sounds like you'll need to create/enhance your controller to retrieve the account record and populate the whoid with the associated contact id.

This was selected as the best answer