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
Salesforce BlitzSalesforce Blitz 

need to insert event and event relation when inserted through dataloader

Created a staging object similar to Event.
Have FROM and TO emailID's of salesforce users loaded from outlook into SF Staging Object fields through DataLoader CLI.

Staging Object name: Event Staging

FROM(field type:email) field will have single email id,
TO(field type:Text) field will have multiple email ids.

Once a record is created in Event staging, FROM field(Salesforce users email need to fetch UserID(15 digit SF ID of user) and needs to create a Single Event record with details(Date,Duration,Subject,Location...). 
As soon as the Event is created,the Event ID will be generated. 
The TO field(Salesforce Users email) needs to fetch userID and create multiple Event relation records mapped to above created Event (based on number of emailID's in To).

Could someone help me in the way as how to approach the coding part.

Thanks & regards