You need to sign in to do that
Don't have an account?
JoshTonks
Querying Opps Count With Events That Are Sat On Appointment
Hi,
Im having alot of difficulty with this some Apex Code
Im trying to Query Opportunities that are Opp Enquiry Source contains referrals and the event on it is a Sat On Appointment. So i can get a count of them in visualforce.
I know how to display counts in visualforce, I know how to query singular objects for these results but because of the information is on an event and some is on an opportunity I have come to a sticking point.
I thought i might have been able to do this with I was previously advised to do it via this
No such column 'Opp_Enquiry_Source__c' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. Is this because of how the What field works on events. That field defiantly exists ive used it previously but its not working
I thought maybe this the following would work
I get this as error
Didn't understand relationship 'e.Opportunity' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.
Thank you in advance
Im having alot of difficulty with this some Apex Code
Im trying to Query Opportunities that are Opp Enquiry Source contains referrals and the event on it is a Sat On Appointment. So i can get a count of them in visualforce.
I know how to display counts in visualforce, I know how to query singular objects for these results but because of the information is on an event and some is on an opportunity I have come to a sticking point.
I thought i might have been able to do this with I was previously advised to do it via this
What.Opp_Enquiry_Source LIKe :IsRefHowever this doesnt work and comes up with
No such column 'Opp_Enquiry_Source__c' on entity 'Name'. If you are attempting to use a custom field, be sure to append the '__c' after the custom field name. Please reference your WSDL or the describe call for the appropriate names. Is this because of how the What field works on events. That field defiantly exists ive used it previously but its not working
I thought maybe this the following would work
return [SELECT Count() FROM Opportunity o,o.Event e WHERE o.Opp_Enquiry_Source__c LIKe :IsRef AND e.Sat_On__c = TRUEIve tried this both ways so Event e, e.Opportunity o and Opportunity o,o.Event e
I get this as error
Didn't understand relationship 'e.Opportunity' in field path. If you are attempting to use a custom relationship, be sure to append the '__r' after the custom relationship name.
Thank you in advance
Try below query.
Best Regards,
Dayakar.D