function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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

Also, see SOQL query below,
See a sample query on Events below, 

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

assnmnt = [
        Id, OwnerID, Owner.Name, Subject, ActivityDateTime, ActivityDate,
        DurationInMinutes, StartDateTime, EndDateTime, Description,  WhatID, WhoID,
        TYPEOF What
            WHEN Opportunity THEN Account_Address__c, Account.Name,
                 Account_Phone__c, Customer_Contact__c
    FROM Event
    WHERE Id = :Asn2Create
    AND WhatId = :My_Opportunity_ID
    AND What.Type = 'Opportunity'

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,
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.

What events are you looking for?