You need to sign in to do that
Don't have an account?
using relationship queries...
Hi !
I need some help...
In apex, I want to get email address from a contact linked to the account concerned by the request on which the trigger started :
I try to explain better : Contact(Object)
(I want to get this...)
Account (Object)
Field_service_manager_contact__c (lookup to contact)
Request__c (Object)
Entity__c (lookup to Account)
(I am here)
Is it clear ?
I don't know how to code this in my class.....
Thanks a lot to help me !
Marie
Hi Marie,
The query should look something like this:
You can check the relationship names by generating this query from APEX Explorer or Eclipse.
All Answers
Hi Marie,
The query should look something like this:
You can check the relationship names by generating this query from APEX Explorer or Eclipse.
Thanks a lot Gulshan,
I will follow your advice !
(and try to get this logic, really difficult for me !!!)
Marie
I have a problem with the select.....
Her is my code :
I'm sorry.....
Can you explain what problem are you facing, is it not saving? What is the error that is coming?
Have you checked your relationship names "__r", are these correct?
Sorry, here is the error message I get when I want to compile :
unexpected token: 'closedRequest.Id'
Add a colon before that.
OK
I did that
After the message was :
Illegal assignment from LIST<Request__c> to SOBJECT:Contact
So I changed to :
Request__c in place of Contact, and now it compiles !
Thanks a lot !
Could you explain to me how to test a query in Eclipse ? I don't know how to do that .....
From the package explorer, open the schema up in Eclipse, type your query into the Query Results box and click 'Run me'.