+ Start a Discussion
Basha sk 16Basha sk 16 

How to get Particular User Events From salesforce?

NagendraNagendra (Salesforce Developers) 
Hi Basha,

You can use a report: Activity Reports

https://help.salesforce.com/HTViewHelpDoc?id=reports_activity.htm&language=en_US

https://success.salesforce.com/answers?id=90630000000h3PBAAY

Also, see SOQL query below, 

http://stackoverflow.com/questions/21059620/salesforce-apex-query-accounts-based-on-activity-history
See a sample query on Events below, 

/ where getOpportunityId is a method that returns the Opportunity Id
My_Opportunity_ID = getOpportunityId();

assnmnt = [
    SELECT
        Id, OwnerID, Owner.Name, Subject, ActivityDateTime, ActivityDate,
        DurationInMinutes, StartDateTime, EndDateTime, Description,  WhatID, WhoID,
        Who.Name,
        TYPEOF What
            WHEN Opportunity THEN Account_Address__c, Account.Name,
                 Account_Phone__c, Customer_Contact__c
        END
    FROM Event
    WHERE Id = :Asn2Create
    AND WhatId = :My_Opportunity_ID
    AND What.Type = 'Opportunity'
http://salesforce.stackexchange.com/questions/15055/help-with-soql-query-on-event-to-get-opportunity-fields

Kindly mark this post as solved if the information help's so that it gets removed from the unanswered queue which results in helping others who are really in need of it.

Best Regards,
Nagendra.P
Basha sk 16Basha sk 16
Hi Nagendra,

Thanks for replying 

may i know this part  WHERE Id = :Asn2Create here exactly what id you are gng to pass.

Thanks,
Basha
Guy_KeshetGuy_Keshet
What events are you looking for?