You need to sign in to do that
Don't have an account?
Dan Jones
Fetching Data from Event Object and Contact Object
Hello all,
I've had a problem accessing information from the Contact object, via a lookup in the Event object. WhoId can't seem to get Phone Numbers, Mobile Numbers, E-Mail addresses etc... Which I need.
I've managed to write the following which, based on the event ID, fetches the information I want.
Hopefully I've explained my problem well enough!
Thank you!
I've had a problem accessing information from the Contact object, via a lookup in the Event object. WhoId can't seem to get Phone Numbers, Mobile Numbers, E-Mail addresses etc... Which I need.
I've managed to write the following which, based on the event ID, fetches the information I want.
List<Event> e1 = new List<Event>(); e1 = [SELECT Id, WhoId FROM Event WHERE Id ='00UD000000SyFMB']; System.debug('@@@@@'+e1); Set<id> WhoId = new Set<id>(); for(event e2 : e1) { whoId.add(e2.whoId); } List<Contact> c = [SELECT Name, Phone, Email FROM Contact WHERE Id IN : WhoId]; System.debug('@@@@@'+c);Running this as an anonymous script returns the data I want, I'm just having trouble articulating it into a wrapper script so I can call information from 2 objects on the same row.
Hopefully I've explained my problem well enough!
Thank you!
I've done the following:
This will pull through the contact record based on that event Id, but now I'm stuck on how to actually pull through that events records.
Any help would be massively appreciated.