function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sanjusanju 

How to retrieve cases related to an account

hi

i'm facing problem extracting cases related to an account.Kindly help me.

it's urgent, so kindly respond soon.


Thanks

sanju 

ChitraChitra
Sanju,

Exactly where do you have problem. It wouldnt help if you just say that you have some issue.

- NC
sanjusanju

Hi chitra

i just want to retrieve all cases related to an account using a single query. However i have used 2 queries to extract it.

select contactid from contact where accountid='accountid_of_individual_account'

 then.....

select casenumber,subject,status from case where contactid='contact1' or contactid='contactid2' and so on.......... but its too cumborse. is there any single line equivalent query for fetching it.

Thanks

sanju

NewhereNewhere

Hi,

Nested querys, joins are not supported in sForce now!! You would have to use 2 separate querys and then match the ids and go forward.