I have this problem with query. I have a trigger on the Account object. When it gets updated I get the IDs from trigger and query all the related Billing Account objects. Then from Billing Account object I would like to query User.Name field. Billing Account has a 'many to one' relationship to Account and User has a 'lookup' relationship to Account. Any suggestions on how can I do this? I'm trying to get 2 lists one with ZIDs which is on Billing Account object and another with names from the User object. For example I have 2 Billing Accounts on Account. If I query Billing Account object I get those 2 IDs. And if I query User object I get just one name and list get out of sync if there are many Accounts entering the trigger. That's why I'm trying to do the query from Billing Account object and get the relationship BillingAccount.Account.User.Name
Thank you for your time!