You need to sign in to do that
Don't have an account?
Abhishek Sharma 527
unable to fetch records from case
Hello There, I'm trying to fetch records from Case object but it showing error as - No such column 'Contact' on entity 'Case'
my query is -
Select id, Status, Account.Name from Case where Contact IN ('Forbes, Sean', 'Pavlova, Stella')
can anyone plz suggest if any mistake
my query is -
Select id, Status, Account.Name from Case where Contact IN ('Forbes, Sean', 'Pavlova, Stella')
can anyone plz suggest if any mistake
you can try like below.
don't forget to mark it as the best answer.
Thank you
All Answers
You cannot put the contact filter on Case like this in SOQL.
So kindly refer thie example :-
Assuming you have Checkbox field in Account as IsChecked__c and Picklist field on Contact as Status__c.
An example query to fetch cases where Account's IsChecked field is check and Contact's Status field is Started
For more detail refer this:-
https://salesforce.stackexchange.com/questions/169565/fetch-contact-name-from-case
Kindly mark it as the best answer if it works for you.
Thanks & Regards,
Priya Ranjan
you can try like below.
don't forget to mark it as the best answer.
Thank you
Regards.
Abhishek
you just need to copy & paste below query in your query Editor and you will find data.
Select id, Status,contact.Name, Account.Name from Case where Contact.Name IN ('Forbes, Sean', 'Pavlova, Stella')
('Forbes, Sean', 'Pavlova, Stella') => this all are contact Name. you can paste here your contact name and try it. It will work.
don't forget to mark it as best answer.
Thank you
Abhishek Sharma 527,
please mark it as the best answer if your query has solved.
Thank you