0

I need to add a contact based on account name(I have a account name and not account-id) . But, in salesforce, they don't have option to add contact based on account name and it has only account-id option. 1. Is it possible to add contact based on account name. 2. Is it possible to get account-id based on account name.

1

That's exactly what you need to do, query the account Id and then populate the contact lookup field with the account Id. The only problem that you've got is that you might have more than 1 account with the same name in the system, so you might need to add more criteria going forward. You can simply get the account Id based on the name with a query like this:

/services/data/vXX.0/query?q=select+Id+From+Account+Where+Name=THEACCOUNTNAME

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.