You need to sign in to do that
Don't have an account?
Accessing PersonContactId
We use PersonAccounts.
On the standard Opportunity object, I have created a Lookup field on Contact, and this field is also added to a Opportunity Page Layout. In edit mode on this page, I can select a PersonAccount as the Contact. Dataloader shows that the value placed in the Lookup field is the PersonContactId of the Account associated with the Opportunity.
All is good--this is just what I want.
Extending the above, I want in Apex to set the Opportunity Lookup field to the same value as I did via the Page layout--which means when I'm done, I want that to be the PersonContactId of the Account associated with the Opportunity. Is this possible? If so, how?