You need to sign in to do that
Don't have an account?
Scott0987
apex salesforce object lookup
I am very new to apex. I would like to be able to assign a variable the id from a salesforce object. For instance I have a apex code that creates a contact. I would like to tie that contact to the account. So I want to do a lookup for the account salesforce object that meets a few criteria, like account name = contact name.
Hi,
This is the way I perceived want you want to accomplish. On the first lines an account and a contact is created separately. Then query an account where the account name is equal to a contact name. In this case update the contact with a reference to this account.
// Niklas
All Answers
Hi,
This is the way I perceived want you want to accomplish. On the first lines an account and a contact is created separately. Then query an account where the account name is equal to a contact name. In this case update the contact with a reference to this account.
// Niklas
Thanks. Learning Apex from scratch has been an entertaining project.