You need to sign in to do that
Don't have an account?
NicoUruguay
SOQL dynamic query throw parent's fields.
Hi.
I'm using dynamic soql as in this example:
String query = 'SELECT Name, Id, Account.Name FROM Contact WHERE Id=\'003A000000A0pAN\''; Contact ct = database.query(query);
After the excecution of the database.query, I can't use Account.Name field value.
Even more, I can use Parent's fields as part of query conditions:
String query1 = 'SELECT Name, Id, Account.Name FROM Contact WHERE Account.Name =\'Acc1\' '; List<Contact> cts = database.query(query1);
Is there any way to obtain parent's field values?
Thanks,
nico.
I used almost your exact code successfully:
This returns the name of the Account. What's your code, and are you getting an error message?
Jeremy