You need to sign in to do that
Don't have an account?

how to get parent id from custom object
Account-->Contact-->Attendance_Record
Here How to get account id in SOQL ...Pl help
I tried like this but getting Error
select id from account where id in:(select id,AccountId from Contact where id in:(SELECT Contact__c FROM Attendance_Record__c))
Here How to get account id in SOQL ...Pl help
I tried like this but getting Error
select id from account where id in:(select id,AccountId from Contact where id in:(SELECT Contact__c FROM Attendance_Record__c))
Since AccountId is there in Contact object itself you wouldn't have to go back three levels.
The following should work ->
SELECT Id, AccountID from Contact where Id in (SELECT Contact__c FROM Attendance_Record__c)
The ':' after in is not required.
Kindly mark it as the Solution if it solved your issue.
Regards,
Lakshmi.