You need to sign in to do that
Don't have an account?
Rodolfo Calvo
Show all contacts from one simple account <query>
Hello team,
I have this code
I tried this:
This query worked fine, but my issue is calling all contact list from calling the account name:
For example: I have Account_1, what I only have is the name, we imagine we do not have the ID, how could make this query by calling the name of the account?
I also tried this but there was no succeed.
Thanks in advance
I have this code
String soql = 'SELECT id, firstName, lastName, accountId FROM Contact';I need to call all contacts from one simple account.
I tried this:
SELECT firstName, lastName, accountId FROM Contact WHERE accountid = '00000000000000'
This query worked fine, but my issue is calling all contact list from calling the account name:
For example: I have Account_1, what I only have is the name, we imagine we do not have the ID, how could make this query by calling the name of the account?
I also tried this but there was no succeed.
String soql = 'SELECT id, firstName, lastName, accountId FROM Contact WHERE account.id;How could I make this query correct?
Thanks in advance
onsole try this
All Answers
It showed me the following error
Try below query
Here is another example, try to modify the data in this and use it.
String query = 'Select Name,id,FirstName from Object__c where Name__c =\''+Object.Field__c+'\' limit 1';
Object = Database.query(query);
PLEASE LIKE THIS ANSWER , IF YOU LIKE IT.
Thanks,
Rohit Alladi
At using
Could you please let me know how you are passing the Account.
Please provide the full code here. so that it will be easy to help you.
onsole try this
Thanks a lot for your answer helped me a lot.
This was exaclty what I needed!! :D
Regards!
Nice to hear you, issue solved.
Happy to help :)
Thanks,
Arun
Raj