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

How to get the owner id of custom object if it contain master look up with another object
Hi,
i have the custom object test it contain master look up with opportunity. And i have another object as testing.In testing i have a master look up with test object. Now i want to use the owner id of testing. How to get the owner id of testing. Please help me out.
If i am want the owner id for test i use the query like
System.debug([select id,opportunity_name__r.ownerid from test__c]);
opportunity_name__c is master look up with opportunity in test. Now i want the owner id of testing. How to use the query for getting the owner id of testing. please help me.
Try this.. You can change the name of object as required..
Select Name from Opportunity where OwnerID IN (Select Id from test__c where
Name='abc')