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
rob3000rob3000 

Convert standard event into custom object

Hi,

Our Sales Reps have to create Visit Reports in Salesforce. There are some requirements that are not met by the Salesforce standard event and I also believe that a custom record type would be of no help. The requirements are:

- Associate Visit to multiple Contacts

- Distribute Visit to multiple receivers

Since they are all using a sync tool for outlook they should still be able to create an event in outlook, sync it to SFDC and then e.g. click a button and convert the event to a Custom Visit Report object that they can further maintain in SFDC.

 

My question is if it is possible to copy the information like start date, end date, createdby and subject from an event into a custom object?

 

Thanks for your feedback!

Best Answer chosen by Admin (Salesforce Developers) 
rob3000rob3000

Problem solved

All Answers

DevAngelDevAngel

Hi rob3000,

 

It is pretty easy to create the custom object to drain your event into. You could do it through a custom button or using a trigger. You will need to write some Apex code either way.  One thing that you should know is that you cannot create a relationship field on the event to relate the event to the new object and you cannot create a releationship field from the new object to the event object.

 

Cheers

rob3000rob3000

Hello DevAngel,

 

Thanks for your reply and the hints; I'd like to use a custom button to copy information from event to custom object, could you please be more how this has to be done?

 

Thanks

rob3000rob3000

Problem solved

This was selected as the best answer
mail2gkishormail2gkishor

HI Rob,

Can you please provide me the example code you did, i also have same requirement to do .

 

Thanks in advance .. Kishor